{"data":{"id":"ACSD-68064","source":"qpt","sourceRef":"magento/quality-patches@1.1.84","title":"Fixes the issue where creating scheduled updates results in duplicate entries in environments with a high number of nested categories.","categories":["Admin","Performance"],"components":["magento/module-catalog"],"origin":"adobe-commerce-support","documentation":{"url":"https://experienceleague.adobe.com/en/docs/commerce-operations/tools/quality-patches-tool/patches-available-in-qpt/v1-1-72/acsd-68064","path":"help/tools/quality-patches-tool/patches-available-in-qpt/v1-1-72/acsd-68064.md","blobSha":"50e1b53075068c24fdd2dfa5f91b26c5a18cb9a7","description":"Creating scheduled updates in environments with a high number of nested categories results in duplicate entries, leading to errors and failure to save the category.","stepsToReproduce":"1. Install a clean instance. 1. Modify the performance fixtures file (small.xml) to include: 1. Categories: 2500 1. Products: 250,000 1. Generate the data using the command: bin/magento setup:performance:generate-fixtures var/performance-toolkit/profiles/ce/small.xml 1. After creating products and categories, ensure all categories are set as anchors by running the following query: UPDATE catalog_category_entity_int set value = 1 where attribute_id = (select attribute_id from eav_attribute where attribute_code = 'is_anchor'); 1. Reindex the data. 1. Log in to the Admin panel and navigate to Catalog > Categories. 1. Move Category 2 under Category 1to create a more nested structure. 1. Go to a deeply nested category, for example, Category 2.1.1. 1. Create a Scheduled Update. 1. Click Save.","introducedInQpt":"1.1.72","createdFor":["2.4.7-p6"],"documentedRange":"2.4.7 - 2.4.7-p7","scheduledFixRelease":"2.4.9"},"files":[{"package":"magento/magento2-base","constraint":">=2.4.7 <2.4.8","path":"patches/os/ACSD-68064_2.4.7-p6.patch","blobSha":"7a2df39a818cf5214dfec662c85e8d1a135ca1f3","url":"https://raw.githubusercontent.com/magento/quality-patches/11d565bdde197b9c7bac859a5698e99098b48457/patches/os/ACSD-68064_2.4.7-p6.patch","thirdParty":false,"modifies":[{"path":"vendor/magento/module-catalog/Model/ResourceModel/Category/Collection.php","change":"modified","package":"magento/module-catalog"}],"packages":["magento/module-catalog"],"hasTests":false,"applicableVersions":{"magento-community":["2.4.7-p10","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"],"magento-commerce":["2.4.7-p10","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"],"mage-os":[]},"unknownVersions":[],"requires":[],"replacedWith":null,"deprecated":false}],"applicableVersions":{"magento-community":["2.4.7-p10","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"],"magento-commerce":["2.4.7-p10","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"],"mage-os":[]},"conditions":{"and":[{"type":"log","path":"var/log/exception.log","match":"Integrity constraint violation: 1062 Duplicate entry '*' for key 'PRIMARY', query was: INSERT INTO `temp_category_descendants_*` (`category_id`, `descendant_id`) SELECT `ce`.`entity_id` AS `category_id`, `ce2`.`entity_id` AS `descendant_id` FROM `catalog_category_entity` AS `ce` INNER JOIN `catalog_category_entity` AS `ce2` ON ce2.path LIKE CONCAT(ce.path, '/%') OR"}]},"requirements":null},"_documentation":"https://magento.watch/api","_description":"Quality patch ACSD-68064 details"}