Product Categories indexer process unknown error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '10-30' for key 'PRIMARY', query was: INSERT INTO temp_catalog_category_tree_index_1381a75b (parent_id,child_id) VALUES (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?),...
-
@pankaj's solution worked for me– paranoid kidJan 24, 2019 at 12:45
-
Please don't add "thank you" as an answer. Instead, vote up the answers that you find helpful. - From Review– Rama Chandran MJan 24, 2019 at 13:05
1 Answer
Check your database table "catalog_category_entity", in path(Tree Path) you will see data like "1/2/10/10/30" as my assumption. This means category ids "1,2,10,10" are its parent in order and 30 is the id of current category. But the issue is duplicate parent because 10 is two time in path tree.
Now You just remove duplicate 10 from path and this should be like "1/2/10/30". Run flush cache and re-indexing command and see your issue is fixed.