Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email

Magento Forum

Can’t add products after upgrade to 1.7: Integrity constraint violation: 1062 Duplicate Entry Issue
Jr. Member
Total Posts:  2
Joined:  2012-03-25

I’ve just upgraded to 1.7 Community edition and everything seemed to be working fine for except one thing: Whenever I try to create a new article, the following error message appears:
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘21-1’ for key ‘UNQ_MGNT_CATALOGINVENTORY_STOCK_ITEM_PRODUCT_ID_STOCK_ID’

With every try the key ‘21-1\’ would simply increase by 1.

I’ve cleared cache, rebuilt indexes with no luck. As recommended in some forums I’ve also:
- Changed config.php <initStatements>SET NAMES utf8; SET FOREIGN_KEY_CHECKS=0; SET UNIQUE_CHECKS=0;</initStatements>
- Renamed Symmetrics_SetMeta.xml to Symmetrics_SetMeta.xml.bak

I’m using the following extensions:
- Locale_Mage_community_de_DE
- trusted_shops_buyer_protection
- market_ready_germany

Does someone have any idea what I could do to resolve this issue?

Magento Community Magento Community
Magento Community
Magento Community
Total Posts:  38
Joined:  2012-03-30

Having the same issue here.

Exactly the same issue.

I have set the SKU to not required, Not unique, and is_user_define to 1 thats why I was able to remove it from the attribute set.
Now, I have changed all item’s SKU’s to XXXXX. All items have the same SKU now.

If, I will set the SKU to be unique again that will fix the issue, I need to change all duplicate SKU’s of more than 3000 items. A SUICIDE mission.

Please help. how to make SKU not unique from the processing of adding products not only in the data base. In the data base, its already not unique but its not letting me because it’s still saying its unique on a certain file in the magento installation which I cant find.

Thank you.

Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top