MDVA-39935: GraphQL returns configurable child products even after they are disabled at the website…
GraphQL returns configurable child products even after they are disabled at the website level. Quality patch MDVA-39935 for magento/module-configurable-product-graph-ql applies to Magento Open Source and Adobe Commerce 2.4.1 to 2.4.3-p3.
- Categories
- GraphQL
- Components
- magento/module-configurable-product-graph-ql
- Origin
- adobe-commerce-support
- Since QPT
- 1.1.2
Issue
GraphQL returns configurable child products even after they are disabled at the website level.
Steps to reproduce
1. Enable display out of stock products option under Store > Configuration > Catalog > Inventory > Stock Options > Display Out of Stock Products > Yes. 1. Select any Configurable Product which has more than two Simple Products. 1. Disable Simple Product and save the Configurable Product. 1. Fetch the Configurable Product data using GraphQL. <pre> <code class="language-graphql"> { products(filter: { sku: { eq: "cp1" } }) { items { __typename name sku ... on ConfigurableProduct { variants { product { __typename name sku color stock_status } } } } } } </code> </pre>
Adobe's page lists 2.4.1 – 2.4.3 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.4.
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 MDVA-39935. On Cloud, add MDVA-39935 under stage.build.QUALITY_PATCHES in .magento.env.yaml.
For cweagans/composer-patches, choose a compatible version below and download the bundle. Copy its MDVA-39935/ 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.1 <2.4.4
- Patch file
- patches/os/MDVA-39935_2.4.2-p1.patch
- vendor/magento/module-configurable-product-graph-ql/Model/Variant/Collection.php
