xperseguers / t3ext-extractor

TYPO3 Extension extractor
https://extensions.typo3.org/extension/extractor
GNU General Public License v2.0
14 stars 23 forks source link

PHP Warning: DOMDocument::loadXML(): ParsePI: PI xpacket never end ... in Entity #86

Closed medarob closed 1 month ago

medarob commented 1 month ago
warning | php | Core: Error handler (BE): PHP  Warning: DOMDocument::loadXML(): ParsePI: PI xpacket never end ... in  Entity, line: 56 in  /var/www/typo3/public/typo3conf/ext/extractor/Classes/Service/Php/PhpService.php  line 275

This message appeared in the log when an editor or admin tried to upload a PDF file. The upload in the backend worked and displaying the file works too. It's just weird that there is a warning/error.

xperseguers commented 1 month ago

I've seen this log numerous time but cannot understand which PDF causes that. Can you possibly attach a PDF leading to this message for further investigation?

xperseguers commented 1 month ago

OK, found a sample PDF and I can reproduce this problem: Sample.pdf

The corresponding chunk is:

<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.6-c015 81.157285, 2014/12/12-00:43:15        ">
   <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
      <rdf:Description rdf:about=""
            xmlns:xmp="http://ns.adobe.com/xap/1.0/"
            xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/"
            xmlns:dc="http://purl.org/dc/elements/1.1/"
            xmlns:pdf="http://ns.adobe.com/pdf/1.3/"
            xmlns:pdfx="http://ns.adobe.com/pdfx/1.3/">
         <xmp:ModifyDate>2015-08-21T09:45:31+01:00</xmp:ModifyDate>
         <xmp:CreateDate>2015-08-21T09:42:21+01:00</xmp:CreateDate>
         <xmp:MetadataDate>2015-08-21T09:45:31+01:00</xmp:MetadataDate>
         <xmp:CreatorTool>Acrobat PDFMaker 15 for Word</xmp:CreatorTool>
         <xmpMM:DocumentID>uuid:32f55d7c-7ef1-46ca-85c0-b5b91509ff82</xmpMM:DocumentID>
         <xmpMM:InstanceID>uuid:4da38cf4-2b42-417c-b34e-f529c34ac6cc</xmpMM:InstanceID>
         <xmpMM:subject>
            <rdf:Seq>
               <rdf:li>1</rdf:li>
            </rdf:Seq>
         </xmpMM:subject>
         <dc:format>application/pdf</dc:format>
         <dc:title>
            <rdf:Alt>
               <rdf:li xml:lang="x-default">PDF Metadata Sample</rdf:li>
            </rdf:Alt>
         </dc:title>
         <dc:description>
            <rdf:Alt>
               <rdf:li xml:lang="x-default">Test Document</rdf:li>
            </rdf:Alt>
         </dc:description>
         <dc:creator>
            <rdf:Seq>
               <rdf:li>Nigel Maddocks</rdf:li>
            </rdf:Seq>
         </dc:creator>
         <dc:subject>
            <rdf:Bag>
               <rdf:li>12345678</rdf:li>
            </rdf:Bag>
         </dc:subject>
         <pdf:Producer>Adobe PDF Library 15.0</pdf:Producer>
         <pdf:Keywords>12345678</pdf:Keywords>
         <pdfx:SourceModified>D:20150821084155</pdfx:SourceModified>
         <pdfx:Company/>
         <pdfx:Comments/>
      </rdf:Description>
   </rdf:RDF>
</x:xmpmeta>

<?xpacket end="w"?