QUALITY PATCH

ACP2E-4431: The Related Products that are matched by the target rules are deleted…

The Related Products that are matched by the target rules are deleted during the reindex process. Quality patch ACP2E-4431 for magento/module-target-rule applies to Magento Open Source and Adobe Commerce 2.4.4 to 2.4.8-p5.

Categories
Catalog/Product
Components
magento/module-target-rule
Origin
adobe-commerce-support
Since QPT
1.1.78

Issue

The Related Products that are matched by the target rules are deleted during the reindex process.

Steps to reproduce

1. Create 10000 or more products. 1. Assign 10000 or more products to 5000 or more categories. 1. Create 100 or more related product rules. 1. Configure rule conditions where Products to match use Product Category is X. 1. Configure Products to display using Product Category is Constant Value Y. 1. Execute this GraphQL query to retrieve related_products for a product: { products(filter: { url_key: { eq: "simple-product-491" } }) { items { sku related_products { uid sku name url_key stock_status price_range { minimum_price { regular_price { value } final_price { value } } } } } } } 1. Create a large backlog for the targetrule_product_rule index. 1. Create a large backlog for the targetrule_rule_product index. 1. Run the targetrule_rule_product indexer. 1. Run the targetrule_product_rule indexer.

Adobe's page lists 2.4.4 - 2.4.8-p4 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-4431. On Cloud, add ACP2E-4431 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-4431/ 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

Packages across compatible versions (1): magento/module-target-rule

Sources

Łukasz Bajsarowicz
Built by

Łukasz Bajsarowicz, e-commerce architect

Magento and Adobe Commerce architecture, upgrades, performance and audits for merchants and agencies since 2015; magento.watch is the tooling I use on those projects.

Open source, maintained on weekends.