mysql - SQL Integrity constraint violation: 1062 Duplicate entry -


when i'm updating products in magento-store externally accounting software i'm receiving following error in logs:

sqlstate[23000]: integrity constraint violation: 1062 duplicate entry '727-0-4-0' key 'cc12c83765b562314470a24f2bdd0f36', query was: insert `catalog_product_entity_group_price` (`entity_id`, `all_groups`, `customer_group_id`, `value`, `website_id`) values (?, ?, ?, ?, ?) 

how fix this?

whenever there issue related "sql integrity constraint", have tried doing below , has worked me well:

each time, plan update products using magento admin panel or source in magento.

magento enterprise edition

navigate system > configuration > advanced > index management > index options > set options "update when scheduled"

magento community edition

navigate system > index management > select > actions > change index mode > manual update > save

these settings avoid sql integrity constraint errors during bulk/single product updates.

after products updated, revert changes below:

magento enterprise edition

navigate system > configuration > advanced > index management > index options > set options "update on save" > save

magento community edition

navigate system > index management > select > actions > change index mode > update on save > save

note :: make sure /var/locks removed before setting these , before doing bulk product update.

let me know if helps.

happy coding...


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -