迁移服务器后,每次我尝试更新客户信息时都会收到错误消息。我正在使用 customer activation plugin , 但在禁用它之后,我仍然得到同样的错误。
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '7-127' for key 2
怎么了?
即使卸载插件后,我在尝试保存客户信息时仍会出现此错误。所以这让我相信它是 Magento 和/或我切换到的服务器的一个更大的问题。
我检查了 Magento 的日志,我多次收到此通知:
ERR (3): User Notice: Sorry, your PCRE extension does not support UTF8 which is needed for the I18N core in ../httpdocs/store/lib/Zend/Locale/Format.php on line 769
这相关吗?
最佳答案
问题是因为当您迁移数据库时,mysql 很有帮助 重新启动自动递增的 id 列,而 Magento 有一些硬编码值假定 ID 从零开始。您需要在导入数据时禁用 foreign_key_checks。
关于mysql - Magento -- "SQLSTATE[23000]: Integrity constraint violation.."客户更新,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6103513/