Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Warning: DOMXPath::query(): Invalid expression in /opt/lampp/htdocs/magento/vendor/magento/framework/Config/Dom.php on line 273

Tags:

magento2

I am using Magento latest release 2.x.

Everything works fine, except when saving a product with an image Magento 2.x throws an error

Warning: DOMXPath::query(): Invalid expression in /opt/lampp/htdocs/magento/vendor/magento/framework/Config/Dom.php on line 273

I have just started learning Magento. any help would be appreciated.

like image 474
Naveen kumar Avatar asked Dec 02 '22 14:12

Naveen kumar


2 Answers

Though it is old question, there is no answer in 5 months. I got 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 root tag in di.xml. For that reason, this error would generate.

If anybody gets this issue, you should check your configuration files.

like image 156
Wasim Avatar answered Dec 23 '22 20:12

Wasim


The Main Problem Is your command line Is not Working...

And A Firstly Check Your Configuration File Before Not working any Idea Then Do this

This is Create an issue in Di.Xml File If you are only changing a Di.xml File Name Then Problem Solved

like image 38
Adwell Scott Avatar answered Dec 23 '22 21:12

Adwell Scott