ACSD-60804: Editing a customer associated with a deleted company results in an error

The ACSD-60804 patch fixes the issue where editing a customer associated with a deleted company causes an error Call to a member function getSuperUserId() on null. This patch is available when the Quality Patches Tool (QPT) 1.1.53 is installed. The patch ID is ACSD-60804. Please note that this issue is scheduled to be fixed in Adobe Commerce 2.4.8.

Affected products and versions

The patch is created for Adobe Commerce version:

Adobe Commerce (all deployment methods) 2.4.6-p2

Compatible with Adobe Commerce versions:

Adobe Commerce (all deployment methods) 2.4.4 - 2.4.7-p3

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

Editing a customer associated with a deleted company causes an error Call to a member function getSuperUserId() on null.

Prerequisites::

Install and enable Adobe Commerce B2B modules.

Steps to reproduce:

  1. Go to Settings > B2B > Enable Company.
  2. Go to Customers > Company > Create New Company.
  3. Log in to mysql for the instance.
  4. Delete the company where entity_id = 1.
  5. Go to Customers > All Customers.
  6. Edit the customer that was automatically created when you created the company.

Expected results:

The customer is edited without an exception error thrown.

Actual results:

An error occurs: Call to a member function getSuperUserId() on null if no company is associated with the customer.

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:

recommendation-more-help
c2d96e17-5179-455c-ad3a-e1697bb4e8c3