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 magento.stackexchange.com, 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 community@magento.com.

Magento Forum

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry
 
Medianist
Jr. Member
 
Total Posts:  16
Joined:  2011-07-18
 

Hi,

after upgrading from 1.6.2.0 to 1.7.0.2 I’m getting always this error:

a:5:{i:0;s:233:"Error in file: "app/code/core/Mage/Cms/data/cms_setup/data-upgrade-1.6.0.0.0-1.6.0.0.1.php" - SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1' for key 'identifier'";i:1;s:1013:"#0 /app/code/core/Mage/Core/Model/Resource/Setup.php(645): Mage::exception('Mage_Core', 'Error in file: ...')

#1 /app/code/core/Mage/Core/Model/Resource/Setup.php(407): Mage_Core_Model_Resource_Setup->_modifyResourceDb('data-upgrade', '1.6.0.0', '1.6.0.0.1')
#2 /app/code/core/Mage/Core/Model/Resource/Setup.php(286): Mage_Core_Model_Resource_Setup->_upgradeData('1.6.0.0', '1.6.0.0.1')
#3 /app/code/core/Mage/Core/Model/Resource/Setup.php(269): Mage_Core_Model_Resource_Setup->applyDataUpdates()
#4 /app/code/core/Mage/Core/Model/App.php(351): Mage_Core_Model_Resource_Setup::applyAllDataUpdates()
#5 /app/Mage.php(683): Mage_Core_Model_App->run(Array)
#6 /index.php(87): Mage::run('', 'store')
#7 {main}"
;s:3:"url";s:1:"/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:2:"de";}

What is wrong? I’m getting this error when upgrading online on my server and local

 
Magento Community Magento Community
Magento Community
Magento Community
 
miraclestudios9
Jr. Member
 
Total Posts:  5
Joined:  2012-10-18
 

Read these discussions:

http://stackoverflow.com/questions/10044062/sqlstate23000-integrity-constraint-violation-1062-duplicate-entry-1922-1-f
http://stackoverflow.com/questions/11349426/how-to-solve-sqlstate23000-integrity-constraint-violation-1062-duplicate-ent

If you are not able to fix it, contact our Magento Experts at: http://www.miraclestudios.in/contact.php

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
kalenjordan
Sr. Member
 
Avatar
Total Posts:  218
Joined:  2011-10-31
Pasadena, CA
 

Hey @Medianist, looks like that particular upgrade script is creating a CMS block with an identifier of privacy-policy-cookie-restriction-mode.

Maybe you happened to already have a footer block with that identifier by chance?  Try renaming that block and then running it again.

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