ACSD-62635: When B2B is enabled, GraphQL request returns all related products from all websites even…
When B2B is enabled, GraphQL request returns all related products from all websites even if a store view scope is used in the request. Quality patch ACSD-62635 for magento/module-related-product-graph-ql applies to Magento Open Source and Adobe Commerce 2.4.7 to 2.4.7-p10.
- Categories
- GraphQL, Catalog/Product
- Components
- magento/module-related-product-graph-ql
- Origin
- adobe-commerce-support
- Since QPT
- 1.1.57
Issue
When B2B is enabled, GraphQL request returns all related products from all websites even if a store view scope is used in the request.
Steps to reproduce
1. Create two websites, stores, and store views. 1. Create the following simple products: * One main with SKU product1 assigned to all websites * One assigned only to Website 1 * One assigned only to Website 2 * One assigned to both Website 1 and Website 2 1. Add all the products as related to product1. 1. Enable B2B and Shared Catalog. 1. Add all products to the default shared catalog. 1. Send GraphQL request to retrieve product1 and its related products with the store code of Website 1 in the header.
Adobe's page lists 2.4.7 - 2.4.7-p3 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.8.
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-62635. On Cloud, add ACSD-62635 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-62635/ 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-base >=2.4.7 <2.4.8
- Magento Open Source
- 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
- Adobe Commerce
- 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
- Patch file
- patches/os/ACSD-62635_2.4.7-p2.patch
- vendor/magento/module-related-product-graph-ql/Model/Resolver/Batch/AbstractLikedProducts.php
- vendor/magento/module-related-product-graph-ql/Model/ResourceModel/RelatedProductsByStoreId.php (added)
