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

7 REPLIES 7

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

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

composer.json >> "require-dev" >> "pelago/emogrifier": "dev-master as 0.1.1"
Then composer update. 

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

composer.json >> "require-dev" >> "pelago/emogrifier": "dev-master as 0.1.1"

Then composer update. 

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

Please check the following link, may be it helps

https://magento.stackexchange.com/a/291421/63940

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

CSS inlining error: DOMXPath::query(): Invalid expression in selector >> @-webkit-keyframes bounceIn << in /var/www/html/vendor/pelago/emogrifier/src/Emogrifier.php on line 530

 

and current magento version 2.3.2 

 

so please help any suggestion

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

CSS inlining error: DOMXPath::query(): Invalid expression in selector >> .home-custom-banner-section [class*='col'] << in /mnt/BLOCKSTORAGE/home/423209.cloudwaysapps.com/yfgvbnrvxt/public_html/vendor/pelago/emogrifier/src/Emogrifier.php on line 530

 

I am getting this error in abandoned cart mail.

can you help me with this?