The MDVA-33281 Magento patch fixes three inventory inconsistency issues. Click on the linked issues under the Issue section to see steps to reproduce these errors. This patch is available when the Magento Quality Patch (MQP) tool 1.0.14 is installed.
Affected products and versions
The patch is created for Magento version:
Magento Commerce Cloud 2.3.5-p1.
Compatible with Magento versions:
Magento Commerce Cloud 2.3.4-2.3.5-p2.
The patch can be applicable to other versions. To check if the patch is compatible with your Magento version, run ./vendor/bin/magento-patches status
.
Issue
The patch fixes inventory inconsistency issues such as:
- PHP Fatal error when running
bin/magento inventory:reservation:list-inconsistencies
in the CLI because of the wrong SKU parameter type. - Duplicate data in inconsistencies list.
- New reservation will be created before order placed (previous realization based on reservation after order placed). In case of errors within order placement, additional reservation will be added to compensate.
There is also a patch MDVA-30112 that solves the issue where there is an unexpectedly large number of reservation inconsistencies in the inventory_reservation
table. For the solution, refer to MDVA-30112 Magento patch: large number reservation inconsistencies.
Steps to reproduce
PHP Fatal error when running bin/magento inventory:reservation:list-inconsistencies
.
To get a list of reservation inconsistencies log in to the production server and run the following command in the CLI (-r - raw output):
bin/magento inventory:reservation:list-inconsistencies -r
Expected Results
The list of reservation inconsistencies is created. These would be returned in the following format <ORDER_INCREMENT_ID>:<SKU>:<QUANTITY>:<STOCK-ID>
.
Actual Results
PHP Fatal error is outputted.
Duplicate data in the inventory_reservation table
.
To troubleshoot reservation inconsistencies, run the following command:
SELECT *, COUNT(*) FROM inventory_reservation GROUP BY metadata, sku, quantity HAVING COUNT(*) > 1
Expected Results
No duplicates.
Actual Results
There are duplicates.
New reservation created before order placed:
- The merchant imports their database.
- They run
bin/magento setup:upgrade
in the terminal. - They list inconsistencies by running
bin/magento inventory:reservation:list-inconsistencies -i -r
in the terminal.
Expected Results
No loop and much quicker results.
Actual Results
The same results are displayed in an infinite loop or the command fails with memory_limit
, depending on system settings.
Apply the patch
For instructions on how to apply an MQP patch, use the following links depending on your Magento product:
- Magento Commerce: DevDocs Apply patches using Magento Quality Patches Tool.
- Magento Commerce Cloud: DevDocs Upgrades and Patches > Apply patches.
Related reading
To learn more about Magento Quality Patches, refer to:
- Magento Quality Patches released: a new tool to self-serve quality patches.
- Check if patch is available for your Magento issue using Magento Quality Patches.
For info about other patches available in MQP tool, refer to the Patches available in MQP tool section.