
No new exception log entries
New Exception Log Entry

in /module-sales/view/frontend/templates/order/order_date.phtml change "date" tag with "span"
Hi @nghelo. Thank you for your report.
To help us process this issue please make sure that you provided the following information:
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
@magento give me 2.3-develop instance - upcoming 2.3.x release
For more details, please, review the Magento Contributor Assistant documentation.
@nghelo do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?
Hi @engcom-Echo. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.[ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.
[ ] 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.
[ ] 4. Verify that the issue is reproducible on 2.3-develop branchDetails
- Add the comment @magento give me 2.3-develop instance to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and _stop verification process here_!
[ ] 5. Add label Issue: Confirmed once verification is complete.
[ ] 6. Make sure that automatic system confirms that report has been added to the backlog.
:white_check_mark: Confirmed by @engcom-Echo
Thank you for verifying the issue. Based on the provided information internal tickets MC-29223 were created
Issue Available: @engcom-Echo, _You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself._
Hi @AndreyChorniy. Thank you for working on this issue.
Looks like this issue is already verified and confirmed. But if you want to validate it one more time, please, go though the following instruction:
Component: XXXXX label(s) to the ticket, indicating the components it may be related to.[ ] 2. Verify that the issue is reproducible on 2.3-develop branchDetails
- Add the comment @magento give me 2.3-develop instance to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and _stop verification process here_!
[ ] 3. If the issue is not relevant or is not reproducible any more, feel free to close it.
in /module-sales/view/frontend/templates/order/order_date.phtml change "date" tag with "span"
I can confirm this solves the exception error.
@GuiltyNL You mean like below. Replace "date" with "/span"
<div class="order-date">
<?= $block->escapeHtml(__('<span class="label">Order Date:</span> %1', '</span>' . $block->formatDate($block->getOrder()->getCreatedAt(), \IntlDateFormatter::LONG) . '</date>'), ['span', 'date']) ?>
</div>
No like this:
<?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', '<span>' . $block->formatDate($block->getOrder()->getCreatedAt(), \IntlDateFormatter::LONG) . '</span>'), ['span', 'date']) ?>
</div>
I also receive this error when navigating to 'customer/account/'...the page mostly breaks and just displays a white background with the table of orders. Unfortunately changing order_date.phtml as suggested here did not solve my problem.

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 ./public_html/vendor/magento/framework/Escaper.php:89)"} []
Update: I'm noticing this is only happening with old orders. I can view every order in the backend (as listed in my screenshot) except the oldest one; which blows up and shows a white screen when i attempt to view it. I'm thinking this is an upgrade issue; caused by the upgrade not gracefully upgrading the database to account for new code.
Update#2: I ultimately figured out my problem and corrected it. During one of the upgrades the product_options field in the sales_order_item table had corrupt data for 258 records. They were serialized wrong. I wrote a PHP program to scan through and correct the data.
Hi @nghelo. Thank you for your report.
The issue has been fixed in magento/magento2#25895 by @AndreyChorniy in 2.4-develop branch
Related commit(s):
The fix will be available with the upcoming 2.4.0 release.
EDIT: It turns out that PHP doesn't like the <time> element, even though the Escaper class does not explicitly forbid it, so the rest of this comment is aspirational.
I realize that you already made a relevant change about 5 weeks ago, but it would be more semantic if the <time> element were used.
Here's a variant that also depends on making datetime an allowed attribute in \Magento\Framework\Escaper:
<?php $orderDateTime = (new \DateTime($block->getOrder()->getCreatedAt())); ?>
<div class="order-date">
<?= $block->escapeHtml(__('<span class="label">Order Date:</span> %1', '<time datetime="' . $orderDateTime->format('c') . '">' . $block->formatDate($orderDateTime, \IntlDateFormatter::LONG) . '</time>'), ['span', 'time']) ?>
</div>
Here's a variant that doesn't depend on making datetime allowed and is much simpler:
<div class="order-date">
<?= $block->escapeHtml(__('<span class="label">Order Date:</span> %1', '<time>' . $block->formatDate($block->getOrder()->getCreatedAt(), \IntlDateFormatter::LONG) . '</time>'), ['span', 'time']) ?>
</div>
@lewisje I tried your solution and still receive the same exception. The original solution is still the answer.
That is quite surprising: It doesn't allow <time> either, even though that is a valid HTML5 element; it's not something banned in the Escaper class, so it must be a problem in PHP.
I upgraded from 2.3.3 to 2.3.4 and then from 2.3.4 to 2.3.5 and I still have the same error.
My shopping cart are international language.
Can anyone give me a tip?
Most helpful comment
I can confirm this solves the exception error.