Magento errors SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘0-918’ for key ‘UNQ_BY_CUSTOMER’

0
170
views

Error :
Error in file: “/app/code/core/Mage/Customer/sql/customer_setup/mysql4-upgrade-1.5.9.9-1.6.0.0.php” – SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry
‘0-918’ for key ‘UNQ_BY_CUSTOMER’

Solutions :
I am having a hard time trying to restore a v1.5.1 backup to the new 1.6 Or 1.7 install and finally i find the solution of this problem.

Whenever you guys got this type of error just open your database and fire the below query on your database.
UPDATE `eav_attribute_group`
SET `default_id` = 1
WHERE `attribute_group_name` = “General” AND `default_id` = 0

Than Clear your cache and refresh your installation.
Need More Information Regarding this error plz check this link:

Hope it’ll help you.
Advertisement