The MDVA-30889 patch solves the issue where an error occurs after invoicing a bundle product with both virtual and simple options. This patch is available when the Magento Quality Patch (MQP) tool v.1.0.9 is installed. Please note that the issue is scheduled to be fixed in Magento version 2.4.2.
Affected products and versions
- The patch was designed for Magento Commerce 2.3.4.
- The patch is also compatible with Magento Commerce and Magento Commerce Cloud 2.3.0 - 2.4.1.
Note: 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
Prerequisites:
Install Magento with Inventory Management.
Steps to reproduce:
- Go to Admin.
- Create a simple product.
- Create a virtual product.
- Create a bundle product (Create two dropdown options for child products, and assign virtual and simple products.). Set Dynamic Price = No.
- Go to the storefront.
- Go to the product's page.
- Add the product to cart.
- Proceed to checkout, and order the product.
- Go to Admin > Orders.
- Open the created order, and invoice it.
Expected results:
The invoice of a bundle product (that contains both simple and virtual products) is created, as expected.
Actual results:
The invoice is not created, and you receive an error similar to this:
TypeError: Return value of Magento\InventorySourceSelection\Model\Request\InventoryRequest::getItems() must be of the type array, null returned in vendor/magento/module-inventory-source-selection/Model/Request/InventoryRequest.php:102
Apply the patch
To apply individual patches use the following links depending on your Magento product:
- Magento Commerce: DevDocs Software Update Guide > Apply Patches.
- 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.