PHP Warning: DOMXPath::query() in stylesheet.cls.php on line 573

So if you’re using DOMPDF and getting this DOMXPath error.. well it’s because you’re using valid HTML (yay!). For more information on how to quickly fix it, read on!

PHP Warning: DOMXPath::query()

PHP Warning:  DOMXPath::query() [<a href='function.DOMXPath-query'>function.DOMXPath-query</a>]: Invalid expression in /home/pdf/include/stylesheet.cls.php on line 573

Ah! Styles these days on pages are wrapped round <!– and –> to make them safe for browsers, bots, validators, etc.

When using DOMPDF, make sure you remove those tags because your CSS styles will never show!

Leave a Reply

Your email address will not be published. Required fields are marked *

 

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>