ACSD-62428: The is_out_of_stock value in the catalog search index is set to an incorrect value…
The is_out_of_stock value in the catalog search index is set to an incorrect value when the SKU is not configured as a searchable attribute, leading to inaccurate stock representation. Quality patch ACSD-62428 for magento/module-inventory-catalog applies to Magento Open Source and Adobe Commerce 2.4.6 to 2.4.6-p15.
- Categories
- Inventory, Catalog Search
- Components
- magento/module-inventory-catalog, magento/module-inventory-configurable-product, magento/module-inventory-elasticsearch, magento/module-inventory-indexer, magento/module-inventory-sales-api
- Origin
- adobe-commerce-support
- Since QPT
- 1.1.56
Issue
The is_out_of_stock value in the catalog search index is set to an incorrect value when the SKU is not configured as a searchable attribute, leading to inaccurate stock representation.
Steps to reproduce
1. Create a custom Source and custom Stock. 1. Create three simple products and assign their inventory to the custom Source. Assign these products to a category. 1. Set the Inventory (MSI) Indexer to Update on Save for easier replication. 1. Set the Source Item Status to In Stock and assign a Quantity. 1. Save the product. 1. Navigate to Stores > Attributes > Product, and open the SKU attribute. 1. Set Use In to No. 1. Change the product quantity (make sure it is not set to 0). 1. Save the product.
Adobe's page lists 2.4.6 - 2.4.6-p8 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-62428. On Cloud, add ACSD-62428 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-62428/ 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/inventory-metapackage >=1.2.6 <1.2.7
- Magento Open Source
- 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
- Adobe Commerce
- 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
- Patch file
- patches/os/ACSD-62428_1.2.6-p5.patch
- vendor/magento/module-inventory-catalog/Plugin/Catalog/Model/ResourceModel/Product/CollectionPlugin.php
- vendor/magento/module-inventory-catalog/Plugin/InventoryIndexer/Model/ResourceModel/GetBulkLegacyStockStatusDataFromStockRegistry.php (added)
- vendor/magento/module-inventory-catalog/etc/frontend/di.xml
- vendor/magento/module-inventory-catalog/etc/graphql/di.xml
- vendor/magento/module-inventory-configurable-product/Plugin/Model/Product/Type/Configurable/IsSalableOptionPlugin.php
- vendor/magento/module-inventory-elasticsearch/Plugin/Model/Adapter/BatchDataMapper/ProductDataMapperPlugin.php
- vendor/magento/module-inventory-indexer/Model/AreMultipleProductsSalable.php (added)
- vendor/magento/module-inventory-indexer/Model/ResourceModel/GetStockItemData.php
- vendor/magento/module-inventory-indexer/Model/ResourceModel/GetStockItemsData.php (added)
- vendor/magento/module-inventory-indexer/Model/ResourceModel/GetStockItemsDataCache.php (added)
- vendor/magento/module-inventory-indexer/Model/ResourceModel/StockItemDataHandler.php (added)
- vendor/magento/module-inventory-indexer/Plugin/InventorySales/AreProductsSalable.php (added)
- vendor/magento/module-inventory-indexer/etc/di.xml
- vendor/magento/module-inventory-indexer/etc/frontend/di.xml
- vendor/magento/module-inventory-indexer/etc/graphql/di.xml
- vendor/magento/module-inventory-sales-api/Model/GetStockItemsDataInterface.php (added)
