Magento问题-违反完整性约束:1062键“ PRIMARY”的条目“ 0”重复

时间:2018-09-02 08:48:13

标签: magento

我使用Magento 1.9,将数据库转移到第二台主机,当我想访问管理页面时,收到此错误消息:

    a:5:{i:0;s:222:"SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '0' for key 'PRIMARY', query was: INSERT INTO `adminnotification_inbox` (`severity`, `date_added`, `title`, `description`, `url`) VALUES (?, ?, ?, ?, ?)";i:1;s:3070:"#0 /home/belinova/sites2/africapap.com/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /home/belinova/sites2/africapap.com/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /home/belinova/sites2/africapap.com/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#3 /home/belinova/sites2/africapap.com/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO `ad...', Array)
#4 /home/belinova/sites2/africapap.com/lib/Varien/Db/Adapter/Pdo/Mysql.php(504): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `ad...', Array)
#5 /home/belinova/sites2/africapap.com/lib/Zend/Db/Adapter/Abstract.php(576): Varien_Db_Adapter_Pdo_Mysql->query('INSERT INTO `ad...', Array)
#6 /home/belinova/sites2/africapap.com/app/code/core/Mage/AdminNotification/Model/Resource/Inbox.php(120): Zend_Db_Adapter_Abstract->insert('adminnotificati...', Array)
#7 /home/belinova/sites2/africapap.com/app/code/core/Mage/AdminNotification/Model/Inbox.php(118): Mage_AdminNotification_Model_Resource_Inbox->parse(Object(Mage_AdminNotification_Model_Inbox), Array)
#8 /home/belinova/sites2/africapap.com/app/code/core/Mage/AdminNotification/Model/Feed.php(97): Mage_AdminNotification_Model_Inbox->parse(Array)
#9 /home/belinova/sites2/africapap.com/app/code/core/Mage/AdminNotification/Model/Observer.php(50): Mage_AdminNotification_Model_Feed->checkUpdate()
#10 /home/belinova/sites2/africapap.com/app/code/core/Mage/Core/Model/App.php(1358): Mage_AdminNotification_Model_Observer->preDispatch(Object(Varien_Event_Observer))
#11 /home/belinova/sites2/africapap.com/app/code/core/Mage/Core/Model/App.php(1337): Mage_Core_Model_App->_callObserverMethod(Object(Mage_AdminNotification_Model_Observer), 'preDispatch', Object(Varien_Event_Observer))
#12 /home/belinova/sites2/africapap.com/app/Mage.php(448): Mage_Core_Model_App->dispatchEvent('controller_acti...', Array)
#13 /home/belinova/sites2/africapap.com/app/code/core/Mage/Core/Controller/Varien/Action.php(527): Mage::dispatchEvent('controller_acti...', Array)
#14 /home/belinova/sites2/africapap.com/app/code/core/Mage/Adminhtml/Controller/Action.php(160): Mage_Core_Controller_Varien_Action->preDispatch()
#15 /home/belinova/sites2/africapap.com/app/code/core/Mage/Core/Controller/Varien/Action.php(407): Mage_Adminhtml_Controller_Action->preDispatch()
#16 /home/belinova/sites2/africapap.com/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('index')
#17 /home/belinova/sites2/africapap.com/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#18 /home/belinova/sites2/africapap.com/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#19 /home/belinova/sites2/africapap.com/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#20 /home/belinova/sites2/africapap.com/index.php(83): Mage::run('', 'store')
#21 {main}";s:3:"url";s:72:"/index.php/special2018/index/index/key/cfb74691b080b49c58f5f46376146b75/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:5:"admin";}

0 个答案:

没有答案