I moved my website from old hosting to new hosting and its giving me error every were like following
please any one sort this out
There has been an error processing your request
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '0' for key 'PRIMARY'
Trace:
#0 C:\inetpub\vhosts\dotnpixel.uk\intu.online\lib\Varien\Db\Statement\Pdo\Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 C:\inetpub\vhosts\dotnpixel.uk\intu.online\app\code\core\Zend\Db\Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 C:\inetpub\vhosts\dotnpixel.uk\intu.online\lib\Zend\Db\Adapter\Abstract.php(480): Zend_Db_Statement->execute(Array)
#3 C:\inetpub\vhosts\dotnpixel.uk\intu.online\lib\Zend\Db\Adapter\Pdo\Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO `ad...', Array)
#4 C:\inetpub\vhosts\dotnpixel.uk\intu.online\lib\Varien\Db\Adapter\Pdo\Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `ad...', Array)
#5 C:\inetpub\vhosts\dotnpixel.uk\intu.online\lib\Zend\Db\Adapter\Abstract.php(576): Varien_Db_Adapter_Pdo_Mysql->query('INSERT INTO `ad...', Array)
#6 C:\inetpub\vhosts\dotnpixel.uk\intu.online\app\code\core\Mage\AdminNotification\Model\Resource\Inbox.php(120): Zend_Db_Adapter_Abstract->insert('adminnotificati...', Array)
#7 C:\inetpub\vhosts\dotnpixel.uk\intu.online\app\code\core\Mage\AdminNotification\Model\Inbox.php(118): Mage_AdminNotification_Model_Resource_Inbox->parse(Object(Mage_AdminNotification_Model_Inbox), Array)
#8 C:\inetpub\vhosts\dotnpixel.uk\intu.online\app\code\core\Mage\AdminNotification\Model\Feed.php(97): Mage_AdminNotification_Model_Inbox->parse(Array)
#9 C:\inetpub\vhosts\dotnpixel.uk\intu.online\app\code\core\Mage\AdminNotification\Model\Observer.php(50): Mage_AdminNotification_Model_Feed->checkUpdate()
#10 C:\inetpub\vhosts\dotnpixel.uk\intu.online\app\code\core\Mage\Core\Model\App.php(1338): Mage_AdminNotification_Model_Observer->preDispatch(Object(Varien_Event_Observer))
#11 C:\inetpub\vhosts\dotnpixel.uk\intu.online\app\code\core\Mage\Core\Model\App.php(1317): Mage_Core_Model_App->_callObserverMethod(Object(Mage_AdminNotification_Model_Observer), 'preDispatch', Object(Varien_Event_Observer))
#12 C:\inetpub\vhosts\dotnpixel.uk\intu.online\app\Mage.php(448): Mage_Core_Model_App->dispatchEvent('controller_acti...', Array)
#13 C:\inetpub\vhosts\dotnpixel.uk\intu.online\app\code\core\Mage\Core\Controller\Varien\Action.php(527): Mage::dispatchEvent('controller_acti...', Array)
#14 C:\inetpub\vhosts\dotnpixel.uk\intu.online\app\code\core\Mage\Adminhtml\Controller\Action.php(160): Mage_Core_Controller_Varien_Action->preDispatch()
#15 C:\inetpub\vhosts\dotnpixel.uk\intu.online\app\code\core\Mage\Core\Controller\Varien\Action.php(407): Mage_Adminhtml_Controller_Action->preDispatch()
#16 C:\inetpub\vhosts\dotnpixel.uk\intu.online\app\code\core\Mage\Core\Controller\Varien\Router\Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('index')
#17 C:\inetpub\vhosts\dotnpixel.uk\intu.online\app\code\core\Mage\Core\Controller\Varien\Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#18 C:\inetpub\vhosts\dotnpixel.uk\intu.online\app\code\core\Mage\Core\Model\App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#19 C:\inetpub\vhosts\dotnpixel.uk\intu.online\app\Mage.php(684): Mage_Core_Model_App->run(Array)
#20 C:\inetpub\vhosts\dotnpixel.uk\intu.online\index.php(90): Mage::run('', 'store')
#21 {main}
Best Answer
No clue why this happens, but I can tell you what happens and a guess what the problem is:
Magento is checking all registered RSS feeds for admin news (the annoying bar at the top XXX unread notifications ALERT!! NEW PATCH bla foo).
When magento checks the feeds, all new items are written to the
adminnoticiation_inbox
table.When this happens the primary_key is not set, so I would assume:
While copying the database you dropped the
AUTOINCREMENT