2011-09-13 56 views
1

我的目錄網址重寫在Magento中被卡住處理。當我運行shell/indexer.php腳本中,我得到以下錯誤目錄URL重寫索引卡住

Catalog URL Rewrites index process unknown error: exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'sugar-tablets.html-1' for key 2' in /home/healthra/public_html/lib/Zend/Db/Statement/Pdo.php:228 Stack trace: #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('UPDATE mg_core...', Array) \#4 /home/healthra/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(337): Zend_Db_
Adapter_Pdo_Abstract->query('UPDATE
mg_core...', Array) #5 /home/healthra/public_html/lib/Zend/Db/Adapter/Abstract.php(632): Varien_Db_A
dapter_Pdo_Mysql->query('UPDATE `mg_core...', Array) #6 /home/healthra/public_html/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysq l4/Url.php(257): Zend_Db_Adapter_Abstract->update('mg_core_url_rew...', Array, '
url_rewrite_id=...') #7 /home/healthra/public_html/app/code/core/Mage/Catalog/Model/Url.php(363): Mag
e_Catalog_Model_Resource_Eav_Mysql4_Url->saveRewrite(Array, Object(Varien_Object
)) #8 /home/healthra/public_html/app/code/core/Mage/Catalog/Model/Url.php(559): Mag
e_Catalog_Model_Url->_refreshProductRewrite(Object(Varien_Object), Object(Varien
_Object)) #9 /home/healthra/public_html/app/code/core/Mage/Catalog/Model/Url.php(253): Mag
e_Catalog_Model_Url->refreshProductRewrites('1') #10 /home/healthra/public_html/app/code/core/Mage/Catalog/Model/Url.php(246): Ma
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->run(
) #16 {main}

有沒有人對如何調試這個問題有什麼建議?

+0

這是在多店安裝?儘管Magento不允許,但您是否有兩個產品條目共享URLkey「sugar-tablets」? Magento通常在保存時將模糊條目分配爲-1(-2代表下一次迭代),因爲產品的URLkeys必須是唯一的。 –

+0

嗨,它是一個多店鋪安裝。我將如何刪除或檢查url密鑰? – user398894

+0

http://stackoverflow.com/questions/5019584/magento-puts-1-in-my-urls-can-i-remove-programatically/5023457#5023457 http://stackoverflow.com/questions/ 5315684/magento的-目錄-URL-重寫-卡住上處理 – B00MER

回答