在Magento 2.2.6中迁移后出现索引错误

时间:2018-10-30 04:48:03

标签: indexing migration magento2

产品类别索引器过程未知错误: SQLSTATE [23000]:违反完整性约束:1062键“ PRIMARY”的条目“ 10-30”重复,查询为:INSERT INTO temp_catalog_category_tree_index_1381a75bparent_idchild_id)值(?, ?),(?,?),(?,?),(?,?),(?,?),(?,?),(?,?),(?,?),(?,?) ,(?,?),(?,?),(?,?),(?,?),(?,?),(?,?),(?,?),(?,?),( ?,?),(?,?),(?,?),(?,?),(?,?),(?,?),(?,?),(?,?),(?、 ?),(?,?),(?,?),(?,?),(?,?),(?,?),(?,?),(?,?),(?,?) ,(?,?),(?,?),(?,?),(?,?),(?,?),(?,?),(?,?),(?,?),( ?,?),(?,?),(?,?),(?,?),(?,?),(?,?),(?,?),(?,?),(?、 ?),(?,?),(?,?),(?,?),(?,?),(?,?),(?,?),(?,?), Error Image

1 个答案:

答案 0 :(得分:0)

检查数据库表“ catalog_category_entity”,在path(树路径)中,您将看到像“ 1/2/10/10/30”这样的数据。这意味着类别ID“ 1,2,10,10”是其顺序的父项,而30是当前类别的ID。但是问题是父级重复,因为路径树中10是两次。

现在,您只需从路径中删除重复的10,就应该像“ 1/2/10/30”。运行flush cache and re-indexing命令,看看问题已解决。