cancel
Showing results for 
Search instead for 
Did you mean: 

CSS inlining error: Warning: DOMXPath::query(): Invalid expression in /var/www/html/dev.instance.

CSS inlining error: Warning: DOMXPath::query(): Invalid expression in /var/www/html/dev.instance.

Hello All,

 

i am getting email template issue in magento 2. In each and every email template i am getting below error:

CSS inlining error: Warning: DOMXPath::query(): Invalid expression in /var/www/html/dev.instance.com/vendor/pelago/emogrifier/Classes/Emogrifier.php on line 269

 

 

Has anyone solved this issue please let me know.

 

Regards

Mukesh Indurkar

2 REPLIES

Re: CSS inlining error: Warning: DOMXPath::query(): Invalid expression in /var/www/html/dev.instance

Hi Mukesh,

I have faced the same issue in Magento version 2.1.7. When ever i got an email from my website, the above warning message also include along with email content. I narrow down the below file which is the cause of the issue. "pub/static/frontend/Vendor/theme/en_US/css/email-inline.css".

 

It contains more than 3k lines of css. I find the three css lines which is the cause of warning message.  

 

div[class^="swatch-opt-"] {
margin-bottom: 5px;
}

.ach-wrapper ul.new-ach-account li:last-child span:after {
content: none;
}

.order-details-items .table-wrapper:not(:last-child) {margin-bottom: 0;}

 

Removed the exponentiation ^ symbol and :last-child as below which resolved the issue.

 

div[class="swatch-opt-"] {
margin-bottom: 5px;
}

 

.ach-wrapper ul.new-ach-account span:after {
content: none;
}

 

 

.order-details-items .table-wrapper:not() {margin-bottom: 0;}

 

I am posting here if any one landed in this page they will get help of this.

Re: CSS inlining error: Warning: DOMXPath::query(): Invalid expression in /var/www/html/dev.instance

Thanks for sharing information. It did resolved my parsing error problem on magento 2.1.7