ACSD-52921: Error requesting cart details from GraphQL for out-of-stock configurable product
The ACSD-52921 patch fixes the issue where an internal error occurs on requesting cart details from GraphQL for an out-of-stock configurable product. This patch is available when the Quality Patches Tool (QPT) 1.1.35 is installed. The patch ID is ACSD-52921. Please note that the issue was fixed in Adobe Commerce 2.4.7.
Affected products and versions
The patch is created for Adobe Commerce version:
- Adobe Commerce (all deployment methods) 2.4.6-p1
Compatible with Adobe Commerce versions:
- Adobe Commerce (all deployment methods) 2.4.5 - 2.4.6-p1
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
An internal error occurs on requesting cart details from GraphQL for an out-of-stock configurable product.
Steps to reproduce:
-
Create a configurable product with a few options.
-
Add an option for the above configurable product to the cart from the frontend (guest checkout).
-
Get the
[ masked_id ]
from the[ quote_id_mask ]
db table for the above created quote. -
Execute the following GraphQL query to get the above guest cart details.
Add the
[ masked_id ]
received from step 3 in the query.code language-graphql { cart(cart_id: "masked_id") { items { product { name sku } ... on ConfigurableCartItem { configurable_options { configurable_product_option_uid option_label configurable_product_option_value_uid value_label } } quantity errors { code message } } } }
-
This will return the quote details without any issues.
-
Go to the backend and update the configurable product’s Stock Status to Out of Stock.
-
Execute the same GraphQL query, as done in step 4.
Expected results:
The error message is sent/treated correctly in the response.
Actual results:
500 Internal Server error is thrown in response to the GraphQL query.
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 released: a new tool to self-serve quality patches in our support knowledge base.
- Check if patch is available for your Adobe Commerce issue using Quality Patches Tool in our support knowledge base.
For info about other patches available in QPT, refer to Quality Patches Tool: Search for patches in the Quality Patches Tool guide.