我的目录URL在Magento中的重写仍然停留在处理上。当我运行shell / indexer.php脚本时,我收到以下错误
目录URL重写索引进程未知错误:异常 带有消息'SQLSTATE [23000]的'PDOException':完整性约束 违规行为:1062重复输入'sugar-tablets.html-1'进入密钥2' /home/healthra/public_html/lib/Zend/Db/Statement/Pdo.php:228 Stack 追踪:#0 /home/healthra/public_html/lib/Zend/Db/Statement/Pdo.php(228): PDOStatement->
execute(Array)#1 /home/healthra/public_html/lib/Zend/Db/Statement.php(300): Zend_Db_Statement_
Pdo-> _execute(Array)#2 /home/healthra/public_html/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Sta
tement-> execute(Array)#3 /home/healthra/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db的
_Adapter_Abstract-> query('UPDATEmg_core...', Array) \#4 /home/healthra/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(337): Zend_Db_
mg_core ...',数组)#5 /home/healthra/public_html/lib/Zend/Db/Adapter/Abstract.php(632): Varien_Db_A
Adapter_Pdo_Abstract->query('UPDATE
dapter_Pdo_Mysql-> query('UPDATE`mg_core ...',数组)#6 /家庭/ healthra /的public_html /应用/代码/核心/法师/目录/型号/资源/ EAV / Mysq L4 / Url.php(257): Zend_Db_Adapter_Abstract-> update('mg_core_url_rew ...',数组,'
url_rewrite_id = ...')#7 /home/healthra/public_html/app/code/core/Mage/Catalog/Model/Url.php(363): 马格
e_Catalog_Model_Resource_Eav_Mysql4_Url-> saveRewrite(阵列, 对象(Varien_Object
))#8 /home/healthra/public_html/app/code/core/Mage/Catalog/Model/Url.php(559): 马格
e_Catalog_Model_Url-> _refreshProductRewrite(对象(Varien_Object), 对象(瓦瑞恩
_Object))#9 /home/healthra/public_html/app/code/core/Mage/Catalog/Model/Url.php(253): 马格
e_Catalog_Model_Url-> refreshProductRewrites('1')#10 /home/healthra/public_html/app/code/core/Mage/Catalog/Model/Url.php(246): 马
ge_Catalog_Model_Url-> refreshRewrites('1')#11 /home/healthra/public_html/app/code/core/Mage/Catalog/Model/Indexer/Url.php( 249):Mage_Catalog_Model_Url-> refreshRewrites()#12 /home/healthra/public_html/app/code/core/Mage/Index/Model/Process.php(139): Mage_Catalog_Model_Indexer_Url-> reindexAll()#13 /home/healthra/public_html/app/code/core/Mage/Index/Model/Process.php(167): Mage_Index_Model_Process-> reindexAll()#14 /home/healthra/public_html/shell/indexer.php(158): Mage_Index_Model_Process-
reindexEverything() #15 /home/healthra/public_html/shell/indexer.php(198): Mage_Shell_Compiler->运行(
)#16 {main}
有没有人对如何调试此问题有任何建议?
答案 0 :(得分:3)
请看这里:Magento Puts -1 in My URLs Can I Remove Programatically?以及此处:http://www.magentocommerce.com/boards/viewthread/9342/。
我发现删除/path/to/mage/var/locks/index_process*.lock
中的所有锁定文件,截断core_url_rewrite
然后重新编制索引会清除问题。