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
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

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:

  1. Go to Admin > Content > Elements > Pages and click Add New Page.

  2. 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.

  3. 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.

  4. 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
      }
    }
    
  5. 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:

  1. The route query renders the full CMS homepage content even though only routing metadata and type-discriminator fields are requested.
  2. 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:

To learn more about Quality Patches Tool, refer to:

recommendation-more-help
commerce-operations-help-tools