ACSD-66153: Page returns 500 error due to cached incorrect layout structure
The ACSD-66153 patch fixes the issue where a page returns a 500 error code due to a cached incorrect layout structure. This patch is available when the Quality Patches Tool (QPT) 1.1.69 is installed. The patch ID is ACSD-66153. Please note that this issue is scheduled to be fixed in Adobe Commerce 2.4.9.
Affected products and versions
The patch is created for Adobe Commerce version:
- Adobe Commerce (all deployment methods) 2.4.5-p10
Compatible with Adobe Commerce versions:
- Adobe Commerce (all deployment methods) 2.4.4 - 2.4.8-p1
magento/quality-patches package to the latest version and check the compatibility on the Quality Patches Tool: Search for patches page. Use the patch ID as a search keyword to locate the patch.Issue
A page returns a 500 error because of a cached incorrect layout structure.
Steps to reproduce:
-
Install
2.4-develop. -
Create and install custom module:
1.1 Add a custom block to thecatalog_category_viewlayout.
1.1 InjectMagento\Framework\View\Result\Layoutinto the custom block through its constructor. -
Create the category shop.
-
Open two terminal windows:
-
Terminal 1: Continuously clean the layout cache:
code language-shell for i in {1..200}; do bin/magento cache:clean layout done -
Terminal 2: Simulate concurrent requests to the category page:
code language-shell for i in {1..200}; do curl -s -o /dev/null -w "Request $i: HTTP %{http_code}\n""http://your_magento_base_url/shop.html?req=$i" done
-
-
Some requests randomly fail with a 500 status code, and the
var/log/support_report.logshows the following error:code language-yaml report.CRITICAL: The element with the "root" ID wasn't found. Verify the ID and try again. [] []
Expected results:
All requests return 200 OK.
Actual results:
Some requests intermittently return 500 Internal Server Error.
Apply the patch
To apply individual patches, use the following links depending on your deployment method:
- Adobe Commerce or Magento Open Source on-premises: Quality Patches Tool > Usage in the Quality Patches Tool guide.
- Adobe Commerce on cloud infrastructure: Upgrades and Patches > Apply Patches in the Commerce on Cloud Infrastructure guide.
Related reading
To learn more about Quality Patches Tool, refer to:
- Quality Patches Tool: A self-service tool for quality patches in the Tools guide.