MDVA-30945: a fatal error during add and update cart operations

The MDVA-30945 patch fixes the issue where you receive a fatal error Call to a member function getValue() on null in module-configurable-product CartItemProcessor.php when updating carts. This patch is available when the Quality Patches Tool (QPT) 1.0.7 is installed. The issue was fixed in Adobe Commerce 2.4.2.

Affected products and versions

The patch is created for Adobe Commerce version:

Adobe Commerce (all deployment methods) 2.3.0 - 2.4.1

NOTE
The patch might become applicable to other versions with new Quality Patches Tool releases. To check if the patch is compatible with your Adobe Commerce version, update the 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

A fatal PHP error after products in the cart are updated in the Admin.

Steps to reproduce:

  1. In the Commerce Admin, create a configurable product without options.
  2. Add it to the cart on the storefront.
  3. Return to Admin, add configurable options to the product and save the changes.
  4. Refresh the cart page on the storefront.

Expected results:

On the cart page, the following validation message is displayed: Some of the products below do not have all the required options.

Actual results:

Cart page is blank. In the PHP error.log, the following error is logged: Uncaught exception ‘Error’ with message ‘Call to a member function getValue() on null’ in vendor/magento/module-configurable-product/Model/Quote/Item/CartItemProcessor.php:76

Apply the patch

To apply individual patches, use the following links depending on your deployment method:

To learn more about Quality Patches Tool, refer to:

For info about other patches available in QPT, refer to Patches available in QPT in our developer documentation.

recommendation-more-help
8bd06ef0-b3d5-4137-b74e-d7b00485808a