The following error is filling up our log files to the point of making them unreadable:

Warning: DOMXPath::query(): Invalid expression
*/var/www/cnn.com.com/gift-shop/var/log/exception.log*: [2017-08-04 1:31:19]  
main.ERROR: Exception: Warning: DOMXPath::query(): Invalid expression in  
/var/www/cnn.com/gift-shop/vendor/pelago/emogrifier/Classes/Emogrifier.php on  
line 269 in .../vendor/magento/framework/App/ErrorHandler.php:61

If I mute this I get a warning on the upcoming foreach after that line.
I assume muting that would continue this chain.
What can I do to begin debugging this?


I got a similar issue and found the cause for my case.

This issue might be generated due to wrong XML configuration. If you would add more code related to this issue, I probably could isolate the exact reason behind this issue.

At my end, I wrote di.xml wrongly, I didn't write <config> tag in di.xml. For that reason, this error would generate.

I hope it helps!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.