ACSD-57045: URL rewrites cause infinite page looping after Website Root unchecked from Hierarchy

The ACSD-57045 patch fixes the issue where URL rewrites cause infinite page looping after Website Root is unchecked from Hierarchy. This patch is available when the Quality Patches Tool (QPT) 1.1.49 is installed. The patch ID is ACSD-57045. Please note that the issue is scheduled to be fixed in Adobe Commerce 2.5.0.

Affected products and versions

The patch is created for Adobe Commerce version:

  • Adobe Commerce (all deployment methods) 2.4.6-p2

Compatible with Adobe Commerce versions:

  • Adobe Commerce (all deployment methods) 2.4.5 - 2.4.6-p7
NOTE
The patch might become applicable to other versions with new Quality Patches Tool releases. To check if the patch is compatible with your Adobe Commerce version, update the 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

URL rewrites cause infinite page looping after Website Root is deselected from Hierarchy.

Steps to reproduce:

  1. Create a CMS page named Test-Parent.

  2. Create a page named Test-Child, and in the Hierarchy section, select Website Root > Parent and save.

  3. Go to Marketing > URL Rewrites.

  4. Notice that there are two new rewrites:

    • Request path to Test-Parent that points to cms/page/view/page_id/ID_NUMBER_FOR_PAGE
    • Request path to Test-Child that points to cms/page/view/page_id/ID_NUMBER_FOR_PAGE
  5. Visit the storefront and add test-child to the URL. You should see the child page.

  6. Do the same thing, but add test-parent/test-child/ to the URL and see the same page.

  7. Go to Marketing > URL Rewrites and select Add URL Rewrite. Choose the following settings:

    • Type: Custom
    • Request path: test-parent/test-child
    • Target path: test-child
    • Redirect Type: Permanent (301)
  8. Visit the test-parent/test-child path and you should be redirected to test-child.

  9. Edit the Child page (Content > Elements > Pages > Pick Child and select Edit).

  10. Under the Hierarchy section, keep Test-Parent selected but unselect Website Root and save.

  11. Go to Marketing > URL Rewrites and notice that the original test-child to cms/page/view/page_id redirect is missing, and at that point it is substituted by a path that points the test-child to test-parent/test-child.

  12. Visit the storefront and try to visit the Test-Child page.

Expected results:

The Test-Child page is opened.

Actual results:

The Test-Child page is not opened. The browser tries to open the test-parent/test-child page in an infinite loop.

Apply the patch

To apply individual patches, use the following links depending on your deployment method:

To learn more about Quality Patches Tool, refer to:

For info about other patches available in QPT, refer to Quality Patches Tool: Search for patches in the Quality Patches Tool guide.

recommendation-more-help
c2d96e17-5179-455c-ad3a-e1697bb4e8c3