ACSD-66311: Companies grid loads slowly for restricted admin users
The ACSD-66311 patch fixes the issue where the companies grid loads slowly for admin users with restricted website access. This patch is available when the Quality Patches Tool (QPT) 1.1.69 is installed. The patch ID is ACSD-66311. Please note that this issue is scheduled to be fixed in ÃÛ¶¹ÊÓÆµ Commerce 2.4.9.
Affected products and versions
The patch is created for ÃÛ¶¹ÊÓÆµ Commerce version:
- ÃÛ¶¹ÊÓÆµ Commerce (all deployment methods) 2.4.7-p4
Compatible with ÃÛ¶¹ÊÓÆµ Commerce versions:
- ÃÛ¶¹ÊÓÆµ Commerce (all deployment methods) 2.4.7-p4 - 2.4.8-p1
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
Companies grid loads slowly for admin users with restricted website access.
Steps to reproduce:
-
Install ÃÛ¶¹ÊÓÆµ Commerce with B2B features.
-
Create 2 extra websites (in addition to Main website) with stores/views:
- Main Website (created during installation)
- Website 2 → Store 2 → StoreView 2
- Website 3 → Store 3 → StoreView 3
-
Create the Admins in Scope user role:
- Scope: only two stores: Main Website + Website 3/Store 3.
- Resources: only Dashboard + Companies.
-
Create an admin user with a role Admins in Scope, for example, adminscope.
-
Generate specific distributed customer and company data:
-
Customers assigned to websites
table 0-row-2 1-row-2 2-row-2 3-row-2 Website ID Number of customers 1 600,000 2 1,500 3 500 -
Run the following query to verify the distribution:
code language-none SELECT website_id, COUNT(*) FROM customer_entity GROUP BY website_id;
-
Customers assigned to companies
table 0-row-2 1-row-2 2-row-2 3-row-2 Number of customers Number of companies 1 4,500 2 ~1,000 ~595k 1 -
Run the following query to verify the distribution:
code language-none SELECT customer_count, COUNT(*) AS number_of_companies FROM ( SELECT company_id, COUNT(customer_id) AS customer_count FROM company_advanced_customer_entity GROUP BY company_id ) AS subquery GROUP BY customer_count ORDER BY customer_count;
-
-
Reindex all data to generate entries in the customer_grid_flat.
-
Log in as adminscope.
-
Go to Customers > Companies.
Expected results:
The page loads in under 1 second.
Actual results:
The page takes more than 14 minutes to load.
Apply the patch
To apply individual patches, use the following links depending on your deployment method:
- ÃÛ¶¹ÊÓÆµ Commerce or Magento Open Source on-premises: Quality Patches Tool > Usage in the Quality Patches Tool guide.
- ÃÛ¶¹ÊÓÆµ Commerce on cloud infrastructure: Upgrades and Patches > Apply Patches in the Commerce on Cloud Infrastructure guide.
Related reading
To learn more about Quality Patches Tool, refer to:
- Quality Patches Tool: A self-service tool for quality patches in the Tools guide.