I am experiencing an issue which not sure why when I try to reindex it gives the error:
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry
'4458-142-1-1293-4458' for key 'PRIMARY', query was: INSERT INTO
`catalog_product_index_eav_temp`
(`entity_id`,`attribute_id`,`store_id`,`value`,`source_id`) VALUES (?,
?, ?, ?, ?), (?, ?, ?, ?, ?), (?, ?, ?, ?, ?), (?, ?, ?, ?, ?), (?, ?,
?, ?, ?), (?, ?, ?, ?, ?), (?, ?, ?, ?, ?), (?, ?, ?, ?, ?), (?, ?, ?,
?, ?), (?, ?, ?, ?, ?), (?, ?, ?, ?, ?).....
Now the problem is I don't see a table in the Database called catalog_product_index_eav_temp
otherwise I would delete the duplicate entry and problem would be solved.
The line that is failing is with EAV:
php bin/magento indexer:reindex Design Config Grid index has been rebuilt successfully in 00:00:00 Customer Grid index has been rebuilt successfully in 00:00:00 Category Products index has been rebuilt successfully in 00:00:00 Product Categories index has been rebuilt successfully in 00:00:00 Product Price index has been rebuilt successfully in 00:00:07
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry
'4458-142-1-1293-4458' for key 'PRIMARY', query was: INSERT INTO
`catalog_product_index_eav_temp`
(`entity_id`,`attribute_id`,`store_id`,`value`,`source_id`) VALUES (?,
?, ?, ?, ?), (?, ?, ?, ?, ?), (?, ?, ?, ?, ?), (?, ?, ?, ?, ?), (?, ?,
?, ?, ?), (?, ?, ?, ?, ?), (?, ?, ?, ?, ?), (?, ?, ?, ?, ?), (?, ?, ?,
?, ?), (?, ?, ?, ?, ?), (?, ?, ?, ?, ?).....
Stock index has been rebuilt successfully in 00:00:00 Catalog Search index has been rebuilt successfully in 00:00:01 Catalog Rule Product index has been rebuilt successfully in 00:00:00 Catalog Product Rule index has been rebuilt successfully in 00:00:00
Does anyone know what could be wrong and how to fix! txs.
catalog_product_entity_varchar
and it was added via API So:SELECT * FROM catalog_product_entity_varchar WHERE value='4458,4458' AND attribute_id= 142\G; This showed me exactly what I need to see so in my case even deleting the product did not work for me.