This problem occuroccurs if you delete a product in backend of your shop backend and some information about its ID is not deleted.
A commondcommon source forof this error is a duplicate entry in cataloginventory_stock_item
. You can search for an ID if you have one. If you want to find all duplicate product entity_idsentity_id
's, then simply use this SQL statement:
SELECT * FROM cataloginventory_stock_item
WHERE product_id in (
SELECT product_id
FROM cataloginventory_stock_item
GROUP BY product_id
HAVING ( COUNT(product_id) > 1 )
)
If it finds duplicates, than you need to delete it.