Bug #86428
closedsimplexml_load_string in ImageInfo should ignore warnings
Added by Remo H. about 6 years ago. Updated almost 5 years ago.
100%
Description
...as it does with errors.
Core: Error handler (FE): PHP Warning: simplexml_load_string(): <sfw xmlns="&ns_sfw;"> in /typo3_src-8.7.19/typo3/sysext/core/Classes/Type/File/ImageInfo.php line 95
Files
vitra-logo-illustrator-not-working.svg (2.21 KB) vitra-logo-illustrator-not-working.svg | Sven Teuber, 2019-01-07 16:28 | ||
vitra-logo-inkscape-working.svg (2.98 KB) vitra-logo-inkscape-working.svg | Sven Teuber, 2019-01-07 16:28 |
Updated by Gerrit Code Review about 6 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58450
Updated by Tymoteusz Motylewski about 6 years ago
please provide steps to reproduce the issue including example svg file.
Thanks!
Updated by Remo H. about 6 years ago
Unfortunately I can not provide the full svg because it is from client project which is not yet online.
The problem is, that simplexml_load_string throws a warning if the namespaces are not correct. This should simply be ignored.
It is not the responsibilty of TYPO3 to log/show any error within an uploaded svg image (external resource).
Here just the relevant part:
<?xml version="1.0" encoding="iso-8859-1"?> <!-- Generator: Adobe Illustrator 22.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd" [ <!ENTITY ns_extend "http://ns.adobe.com/Extensibility/1.0/"> <!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/"> <!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/"> <!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/"> <!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/"> <!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/"> <!ENTITY ns_custom "http://ns.adobe.com/GenericCustomNamespace/1.0/"> <!ENTITY ns_adobe_xpath "http://ns.adobe.com/XPath/1.0/"> <!ENTITY st0 "display:none;"> <!ENTITY st1 "display:inline;fill:#E5E9F5;"> <!ENTITY st2 "fill:#E5EDF4;"> <!ENTITY st3 "fill:#005292;"> ]> <svg version="1.0" xmlns:x="&ns_extend;" xmlns:i="&ns_ai;" xmlns:graph="&ns_graphs;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 504.57 334.48" style="enable-background:new 0 0 504.57 334.48;" xml:space="preserve"> <!-- ... --> </svg
From sys_log:
Core: Exception handler (WEB): Uncaught TYPO3 Exception: #1476107295 : PHP Warning: simplexml_load_string(): namespace warning : xmlns: URI &ns_sfw; is not absolute in /var/www/web/typo3/sysext/core/Classes/Type/File/ImageInfo.php line 124 | TYPO3\CMS\Core\Error\Exception thrown in file /var/www/web/typo3/sysext/core/Classes/Error/ErrorHandler.php in line 116. Requested URL: http://www.domain.vm/typo3/index.php?route=%%2Fajax%%2Ffile%%2Fprocess&token=--Anonymiz
Updated by Sven Teuber almost 6 years ago
- File vitra-logo-illustrator-not-working.svg vitra-logo-illustrator-not-working.svg added
- File vitra-logo-inkscape-working.svg vitra-logo-inkscape-working.svg added
Issue still exists in TYPO3 8.7.22. Example SVG attached.
It has something to do with the SVG code Adobe Illustrator exports. After optimizing the file in Inkscape, the SVG code looks very different and the file can be uploaded without errors (second attached file).
Updated by Gerrit Code Review almost 6 years ago
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/59802
Updated by Gerrit Code Review almost 6 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/59802
Updated by Gerrit Code Review over 5 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/59802
Updated by Gerrit Code Review over 5 years ago
Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60470
Updated by Remo H. over 5 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset bc76058e800deb1d3090f0ba845aaccbd02e7fc2.
Updated by Gerrit Code Review over 5 years ago
- Status changed from Resolved to Under Review
Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60473
Updated by Remo H. over 5 years ago
- Status changed from Under Review to Resolved
Applied in changeset 63c756ef594321950b92aff3d34a1b0448da83c0.
Updated by Spawoz Technologies Pvt Ltd. almost 5 years ago
Hi All,
I can able to reproduce the same issue with TYPO3 9.5.13 version. Could you please have a look on this? Because of this, the filelist module is broken. Thank you.