突然出现在magento后端保存选项的问题。我尝试了所有可行的方法。我也注意到在前端登录并点击我的购物车或索引页面时它会自动注销。我目前正在使用hostgator服务器,这一切都突然发生。
这是我的exception.log文件
2015-12-10T06:54:12+00:00 ERR (3):
exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1149326' for key 'PRIMARY'' in /home/public_html/lib/Zend/Db/Statement/Pdo.php:228
Stack trace:
#0 /home1/lib/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array)
#1 /home1/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#2 /home1/lib/Zend/Db/Statement.php(300): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#3 /home1/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#4 /home1/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO `lo...', Array)
#5 /home1/lib/Varien/Db/Adapter/Pdo/Mysql.php(389): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `lo...', Array)
#6 /home1/lib/Zend/Db/Adapter/Abstract.php(574): Varien_Db_Adapter_Pdo_Mysql->query('INSERT INTO `lo...', Array)
#7 /home1/app/code/core/Mage/Log/Model/Resource/Visitor.php(241): Zend_Db_Adapter_Abstract->insert('log_quote', Array)
#8 /home1/app/code/core/Mage/Log/Model/Resource/Visitor.php(116): Mage_Log_Model_Resource_Visitor->_saveQuoteInfo(Object(Mage_Log_Model_Visitor))
#9 /home1/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(458): Mage_Log_Model_Resource_Visitor->_afterSave(Object(Mage_Log_Model_Visitor))
#10 /home1/app/code/core/Mage/Core/Model/Abstract.php(318): Mage_Core_Model_Resource_Db_Abstract->save(Object(Mage_Log_Model_Visitor))
#11 /home1/app/code/core/Mage/Log/Model/Visitor.php(188): Mage_Core_Model_Abstract->save()
#12 /home1/app/code/core/Mage/Core/Model/App.php(1299): Mage_Log_Model_Visitor->saveByRequest(Object(Varien_Event_Observer))
#13 /home1/app/code/core/Mage/Core/Model/App.php(1280): Mage_Core_Model_App->_callObserverMethod(Object(Mage_Log_Model_Visitor), 'saveByRequest', Object(Varien_Event_Observer))
#14 /home1/app/Mage.php(416): Mage_Core_Model_App->dispatchEvent('controller_acti...', Array)
#15 /home1/app/code/core/Mage/Core/Controller/Varien/Action.php(534): Mage::dispatchEvent('controller_acti...', Array)
#16 /home1/app/code/core/Mage/Core/Controller/Front/Action.php(70): Mage_Core_Controller_Varien_Action->postDispatch()
#17 /home1/app/code/core/Mage/Core/Controller/Varien/Action.php(424): Mage_Core_Controller_Front_Action->postDispatch()
#18 /home1/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('noRoute')
#19 /home1/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#20 /home1/app/code/core/Mage/Core/Model/App.php(347): Mage_Core_Controller_Varien_Front->dispatch()
#21 /home1/app/Mage.php(640): Mage_Core_Model_App->run(Array)
#22 /home1/index.php(80): Mage::run('', 'store')
#23 {main}
Next exception 'Zend_Db_Statement_Exception' with message 'SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1149326' for key 'PRIMARY'' in /home1/lib/Zend/Db/Statement/Pdo.php:234
Stack trace:
#0 /home1/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /home1/lib/Zend/Db/Statement.php(300): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /home1/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#3 /home1/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO `lo...', Array)
#4 /home1/lib/Varien/Db/Adapter/Pdo/Mysql.php(389): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `lo...', Array)
#5 /home1/lib/Zend/Db/Adapter/Abstract.php(574): Varien_Db_Adapter_Pdo_Mysql->query('INSERT INTO `lo...', Array)
#6 /home1/app/code/core/Mage/Log/Model/Resource/Visitor.php(241): Zend_Db_Adapter_Abstract->insert('log_quote', Array)
#7 /home1/app/code/core/Mage/Log/Model/Resource/Visitor.php(116): Mage_Log_Model_Resource_Visitor->_saveQuoteInfo(Object(Mage_Log_Model_Visitor))
#8 /home1/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(458): Mage_Log_Model_Resource_Visitor->_afterSave(Object(Mage_Log_Model_Visitor))
#9 /home1/app/code/core/Mage/Core/Model/Abstract.php(318): Mage_Core_Model_Resource_Db_Abstract->save(Object(Mage_Log_Model_Visitor))
#10 /home1/app/code/core/Mage/Log/Model/Visitor.php(188): Mage_Core_Model_Abstract->save()
#11 /home1/app/code/core/Mage/Core/Model/App.php(1299): Mage_Log_Model_Visitor->saveByRequest(Object(Varien_Event_Observer))
#12 /home1/app/code/core/Mage/Core/Model/App.php(1280): Mage_Core_Model_App->_callObserverMethod(Object(Mage_Log_Model_Visitor), 'saveByRequest', Object(Varien_Event_Observer))
#13 /home1/app/Mage.php(416): Mage_Core_Model_App->dispatchEvent('controller_acti...', Array)
#14 /home1/app/code/core/Mage/Core/Controller/Varien/Action.php(534): Mage::dispatchEvent('controller_acti...', Array)
#15 /home1/app/code/core/Mage/Core/Controller/Front/Action.php(70): Mage_Core_Controller_Varien_Action->postDispatch()
#16 /home1/app/code/core/Mage/Core/Controller/Varien/Action.php(424): Mage_Core_Controller_Front_Action->postDispatch()
#17 /home1/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('noRoute')
#18 /home1/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#19 /home1/app/code/core/Mage/Core/Model/App.php(347): Mage_Core_Controller_Varien_Front->dispatch()
#20 /home1/app/Mage.php(640): Mage_Core_Model_App->run(Array)
#21 /home1/index.php(80): Mage::run('', 'store')
#22 {main}
答案 0 :(得分:0)
如果其他一切正常(除了数据保存),那么您应该检查对服务器的数据提交是否没有重定向。大部分时间问题都是由.htaccess
中的错误网址重写规则引起的答案 1 :(得分:0)
感谢大家的宝贵时间和帮助。我想告诉我我终于解决了它。
我删除了app / etc中的local.xml和前端重新配置的magento安装。我保留了旧数据库,神奇地问题就消失了。仍然不知道问题是什么,但它有效!