ACP2E-4603: Catalog Permissions product reindexing leaves existing permission index rows unchanged…
Catalog Permissions product reindexing leaves existing permission index rows unchanged, so updated category permission grants don't reflect correctly on products. Quality patch ACP2E-4603 for magento/module-catalog-permissions applies to Magento Open Source and Adobe Commerce 2.4.6 to 2.4.7-p9.
- Categories
- Catalog/Product
- Components
- magento/module-catalog-permissions
- Origin
- adobe-commerce-support
- Since QPT
- 1.1.79
Issue
Catalog Permissions product reindexing leaves existing permission index rows unchanged, so updated category permission grants don't reflect correctly on products.
Steps to reproduce
1. Enable Category Permissions: 1. Log in to the Admin. 1. Go to Stores > Configuration. 1. Under Catalog, select Catalog. 1. Expand Category Permissions. 1. Set Enable to Yes. 1. Save the Configuration. 1. Create 50 or more customer groups (Option A or Option B): 1. Option A — Admin: Go to Customers > Customer Groups and select Add New. Enter a group name (for example, ACSD70034_01) and select the default tax class, then Save. Repeat to create 50 or more groups. 1. Option B (recommended) — REST API: Send a POST request to /rest/V1/customerGroups with the request body {"group":{"code":"ACSD70034_01","taxClassId":0}}. Repeat to create 50 groups (ACSD70034_01 through ACSD70034_50). 1. Add category permissions in Admin: 1. Go to Catalog > Categories. 1. Edit 10–20 or more categories to increase reproducibility. 1. In each category, scroll to Category Permissions and select Add Permission. 1. Select a website (for example, Main Website) and assign one of the previously created customer groups. 1. Configure Grant Catalog Category View, Grant Product Price, and Grant Checkout as required. 1. Select Save. 1. Recommended scale: Create a larger data set (for example, 20 categories and 20–50 customer groups) to generate 400–1,000 permission rows. 1. Ensure a single index table (default): 1. Go to Stores > Configuration > Catalog > Catalog > Category Permissions. 1. If Dimensions or Indexer Dimensions appears, set it to None (not Customer Group) to use a single index table. 1. Run reindex with parallel threads from the CLI: 1. Export MAGE_INDEXER_THREADS_COUNT=4. 1. Run php bin/magento indexer:reset catalogpermissions_category catalogpermissions_product. 1. Run php bin/magento indexer:reindex catalogpermissions_category catalogpermissions_product. 1. Repeat the reset and reindex commands 5–10 times to reproduce the deadlock during parallel execution.
Adobe's page lists 2.4.6 - 2.4.7-p9 as compatible; the versions below are resolved from the current QPT constraints and are the ones the tool will offer.
Adobe scheduled the permanent fix for 2.4.9.
Install
Install the Quality Patches Tool with composer require magento/quality-patches, apply the prerequisites listed for all files applicable to your distribution and version first, then run vendor/bin/magento-patches apply ACP2E-4603. On Cloud, add ACP2E-4603 under stage.build.QUALITY_PATCHES in .magento.env.yaml.
For cweagans/composer-patches, choose a compatible version below and download the bundle. Copy its ACP2E-4603/ folder into patches/composer/, merge composer.patches.json into composer.json, then run composer install. Bundle prerequisites the same way and list them first. Paths are relative to each package root, using the default -p1 level. Prefer local files when configuring composer-patches; a remote URL can change.
Patch files and compatible versions
magento/magento2-ee-base >=2.4.6 <2.4.6-p15 || >=2.4.7 <2.4.7-p10
- Magento Open Source
- —
- Adobe Commerce
- 2.4.7-p9, 2.4.7-p8, 2.4.7-p7, 2.4.7-p6, 2.4.7-p5, 2.4.7-p4, 2.4.7-p3, 2.4.7-p2, 2.4.7-p1, 2.4.7, 2.4.6-p14, 2.4.6-p13, 2.4.6-p12, 2.4.6-p11, 2.4.6-p10, 2.4.6-p9, 2.4.6-p8, 2.4.6-p7, 2.4.6-p6, 2.4.6-p5, 2.4.6-p4, 2.4.6-p3, 2.4.6-p2, 2.4.6-p1, 2.4.6
- Requires
- ACSD-67603
- vendor/magento/module-catalog-permissions/Model/Indexer/AbstractAction.php
- vendor/magento/module-catalog-permissions/Model/Indexer/Product/IndexFiller.php
- vendor/magento/module-catalog-permissions/Model/Indexer/RetryConfiguration.php (added)
- vendor/magento/module-catalog-permissions/Model/Indexer/RetryConfigurationInterface.php (added)
- vendor/magento/module-catalog-permissions/Model/ResourceModel/Permission/Index.php
- vendor/magento/module-catalog-permissions/etc/di.xml
