ACP2E-5143: GraphQL route query renders unrequested CMS page content
The ACP2E-5143 patch fixes the issue where the GraphQL route query renders the full CMS page content, including Page Builder widgets and product lists, even when only URL routing fields are requested, which slows down URL resolution. This patch is available when the Quality Patches Tool (QPT) 1.1.84 is installed. The patch ID is ACP2E-5143. Please note that this issue is scheduled to be fixed in Adobe Commerce 2.4.10.
Affected products and versions
The patch is created for Adobe Commerce version:
- Adobe Commerce (all deployment methods) 2.4.7-p9
Compatible with Adobe Commerce versions:
- Adobe Commerce (all deployment methods) 2.4.4 - 2.4.7-p10
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
Issue where the GraphQL route query renders the full CMS page content, including Page Builder widgets and product lists, even when only URL routing fields are requested, which slows down URL resolution.
Prerequisites:
Page Builder is installed.
Steps to reproduce:
-
Go to Admin > Content > Elements > Pages and click Add New Page.
-
Enter the page details, set Enable Page to Yes, and click Edit with Page Builder in the Content section. Expand Add Content in the Page Builder panel and drag a Products placeholder onto the stage, or insert a catalog product widget into the page content.
-
In Admin, go to Stores > Settings > Configuration. In the left panel under General, choose Web, then expand Default Pages. Set CMS Home Page to the new page and click Save Config.
-
Send the following GraphQL request:
code language-none query ResolveURL($url: String!) { route(url: $url) { relative_url redirect_code type ... on CmsPage { identifier __typename } ... on ProductInterface { uid __typename } ... on CategoryInterface { uid __typename } __typename } } -
Use the following variables for the request:
code language-none { "url": "/" }
Expected results:
The route query returns the requested routing metadata and type-discriminator fields for the CMS homepage without rendering its full content.
Actual results:
- The
routequery renders the full CMS homepage content even though only routing metadata and type-discriminator fields are requested. - Page Builder widgets load product collections, increasing response time and the number of database queries per request.
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