cancel
Showing results for 
Search instead for 
Did you mean: 

main.CRITICAL: DOMDocument::loadHTML(): Tag date invalid in Entity, line: 1

main.CRITICAL: DOMDocument::loadHTML(): Tag date invalid in Entity, line: 1

Hi Guys!

Even performing the upgrade from Magento 2.3.3 to 2.3.4 I was not able to correct the error below:


Did anyone go through this experience?

 

 

[2020-12-17 23:50:50] main.CRITICAL: DOMDocument::loadHTML(): Tag date invalid in Entity, line: 1 {"exception":"[object] (InvalidArgumentException(code: 2): DOMDocument::loadHTML(): Tag date invalid in Entity, line: 1 at ../vendor/magento/framework/Escaper.php:89)"} []
[2020-12-17 23:51:26] main.CRITICAL: DOMDocument::loadHTML(): Tag date invalid in Entity, line: 1 {"exception":"[object] (InvalidArgumentException(code: 2): DOMDocument::loadHTML(): Tag date invalid in Entity, line: 1 at ../vendor/magento/framework/Escaper.php:89)"} []
[2020-12-17 23:52:01] main.CRITICAL: DOMDocument::loadHTML(): Tag date invalid in Entity, line: 1 {"exception":"[object] (InvalidArgumentException(code: 2): DOMDocument::loadHTML(): Tag date invalid in Entity, line: 1 at .../vendor/magento/framework/Escaper.php:89)"} []

3 REPLIES 3

Re: main.CRITICAL: DOMDocument::loadHTML(): Tag date invalid in Entity, line: 1

check your CMS Pages & Blocks
you must be having a tag for a date like <date />
it's not validating in the validator. 

 

you need to remove that and save CMS again 

 

kindly Accept as a Solution if this works for you and give Kudos Smiley Happy 

Re: main.CRITICAL: DOMDocument::loadHTML(): Tag date invalid in Entity, line: 1

I did not find any invalidate tag

./vendor/magento/module-sales/view/frontend/templates/order/order_date.phtml

<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
?>
<div class="order-date">
<?= $block->escapeHtml(__('<span class="label">Order Date:</span> %1', '<date>' . $block->formatDate($block->getOrder()->getCreatedAt(), \IntlDateFormatter::LONG) . '</date>'), ['span', 'date']) ?>
</div>
~
~

Re: main.CRITICAL: DOMDocument::loadHTML(): Tag date invalid in Entity, line: 1

Did you find a solution? I'm seeing this issue as well. We're running version 2.3.5.