ACSD-66072: Related products are not returned via GraphQL on the Product Detail Page due…
Related products are not returned via GraphQL on the Product Detail Page due to an internal server error when Related Products Rule is configured. Quality patch ACSD-66072 for magento/module-target-rule applies to Magento Open Source and Adobe Commerce 2.4.6 to 2.4.8-p5.
- Categories
- Catalog/Product, GraphQL
- Components
- magento/module-target-rule
- Origin
- adobe-commerce-support
- Since QPT
- 1.1.68
Issue
Related products are not returned via GraphQL on the Product Detail Page due to an internal server error when Related Products Rule is configured.
Steps to reproduce
1. Create configurable products: * Product 1: config1 with option1 * Product 2: config2 with option2 1. Create and assign products to a category * Create a new category. * Assign both products (config1 and config2) to this category. 1. Navigate to Marketing > Promotions > Related Products Rule, then create a new rule with the following settings: * Priority: 1 * Applies To: Related Products * Result Limit: 10 * Products to Match: Attribute Set is Default * Products to Display: Product Category is the Same as Matched Product Categories 1. Run the following Magento CLI commands: bin/magento indexer:reindex bin/magento cache:clean 1. Send a POST request to ../graphql with the following payload: query getRelatedProductsForProductPage($urlKey: String!) { products(filter: { url_key: { eq: $urlKey } }) { items { id __typename uid url_key name sku related_products { id uid name sku stock_status url_key small_image { url __typename } thumbnail { url __typename } image { url __typename } price_range { maximum_price { regular_price { currency value __typename } __typename } minimum_price { discount { amount_off percent_off __typename } final_price { currency value __typename } regular_price { currency value __typename} __typename} __typename} __typename } } __typename } }
Adobe's page lists 2.4.6 - 2.4.8-p1 as compatible; the versions below are resolved from the current QPT constraints and are the ones the tool will offer.
Adobe scheduled the permanent fix for 2.4.9.
Install
Install the Quality Patches Tool with composer require magento/quality-patches, apply the prerequisites listed for all files applicable to your distribution and version first, then run vendor/bin/magento-patches apply ACSD-66072. On Cloud, add ACSD-66072 under stage.build.QUALITY_PATCHES in .magento.env.yaml.
For cweagans/composer-patches, choose a compatible version below and download the bundle. Copy its ACSD-66072/ folder into patches/composer/, merge composer.patches.json into composer.json, then run composer install. Bundle prerequisites the same way and list them first. Paths are relative to each package root, using the default -p1 level. Prefer local files when configuring composer-patches; a remote URL can change.
Patch files and compatible versions
magento/magento2-ee-base >=2.4.6 <2.4.9
- Magento Open Source
- —
- Adobe Commerce
- 2.4.8-p5, 2.4.8-p4, 2.4.8-p3, 2.4.8-p2, 2.4.8-p1, 2.4.8, 2.4.7-p10, 2.4.7-p9, 2.4.7-p8, 2.4.7-p7, 2.4.7-p6, 2.4.7-p5, 2.4.7-p4, 2.4.7-p3, 2.4.7-p2, 2.4.7-p1, 2.4.7, 2.4.6-p15, 2.4.6-p14, 2.4.6-p13, 2.4.6-p12, 2.4.6-p11, 2.4.6-p10, 2.4.6-p9, 2.4.6-p8, 2.4.6-p7, 2.4.6-p6, 2.4.6-p5, 2.4.6-p4, 2.4.6-p3, 2.4.6-p2, 2.4.6-p1, 2.4.6
- vendor/magento/module-target-rule/Model/ResourceModel/Index.php
