2012-05-07 79 views
2

我已經更新magento從1.6.2到1.7,everthing進行順利,顯然該網站工作得很好。然而,我不能再看產品價格,看起來像其中一個表是缺少列。我試過殼工具,這就是我得到的:Magento 1.6.2 - > 1.7升級導致價格指數腐敗

Product Prices index process unknown error: 
exception 'PDOException' with message 'SQLSTATE[21S01]: Insert value list does not match column list: 1136 Column count doesn't match value count at row 1' in /home/thelittl/public_html/asia/lib/Zend/Db/Statement/Pdo.php:228 
Stack trace: 
#0 /home/thelittl/public_html/asia/lib/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array) 
#1 /home/thelittl/public_html/asia/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array) 
#2 /home/thelittl/public_html/asia/lib/Zend/Db/Statement.php(300): Varien_Db_Statement_Pdo_Mysql->_execute(Array) 
#3 /home/thelittl/public_html/asia/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array) 
#4 /home/thelittl/public_html/asia/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO `ca...', Array) 
#5 /home/thelittl/public_html/asia/lib/Varien/Db/Adapter/Pdo/Mysql.php(419): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `ca...', Array) 
#6 /home/thelittl/public_html/asia/app/code/community/Brim/Groupedoptions/Model/Resource/Eav/Mysql4/Product/Indexer/Price/Grouped.php(76): Varien_Db_Adapter_Pdo_Mysql->query('INSERT INTO `ca...') 
#7 /home/thelittl/public_html/asia/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price/Grouped.php(48): Brim_Groupedoptions_Model_Resource_Eav_Mysql4_Product_Indexer_Price_Grouped->_prepareGroupedProductPriceData() 
#8 /home/thelittl/public_html/asia/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price.php(385): Mage_Catalog_Model_Resource_Product_Indexer_Price_Grouped->reindexAll() 
#9 /home/thelittl/public_html/asia/app/code/core/Mage/Index/Model/Indexer/Abstract.php(143): Mage_Catalog_Model_Resource_Product_Indexer_Price->reindexAll() 
#10 /home/thelittl/public_html/asia/app/code/core/Mage/Index/Model/Process.php(209): Mage_Index_Model_Indexer_Abstract->reindexAll() 
#11 /home/thelittl/public_html/asia/app/code/core/Mage/Index/Model/Process.php(255): Mage_Index_Model_Process->reindexAll() 
#12 /home/thelittl/public_html/asia/shell/indexer.php(158): Mage_Index_Model_Process->reindexEverything() 
#13 /home/thelittl/public_html/asia/shell/indexer.php(198): Mage_Shell_Compiler->run() 
#14 {main} 

Next exception 'Zend_Db_Statement_Exception' with message 'SQLSTATE[21S01]: Insert value list does not match column list: 1136 Column count doesn't match value count at row 1' in /home/thelittl/public_html/asia/lib/Zend/Db/Statement/Pdo.php:234 
Stack trace: 
#0 /home/thelittl/public_html/asia/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array) 
#1 /home/thelittl/public_html/asia/lib/Zend/Db/Statement.php(300): Varien_Db_Statement_Pdo_Mysql->_execute(Array) 
#2 /home/thelittl/public_html/asia/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array) 
#3 /home/thelittl/public_html/asia/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO `ca...', Array) 
#4 /home/thelittl/public_html/asia/lib/Varien/Db/Adapter/Pdo/Mysql.php(419): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `ca...', Array) 
#5 /home/thelittl/public_html/asia/app/code/community/Brim/Groupedoptions/Model/Resource/Eav/Mysql4/Product/Indexer/Price/Grouped.php(76): Varien_Db_Adapter_Pdo_Mysql->query('INSERT INTO `ca...') 
#6 /home/thelittl/public_html/asia/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price/Grouped.php(48): Brim_Groupedoptions_Model_Resource_Eav_Mysql4_Product_Indexer_Price_Grouped->_prepareGroupedProductPriceData() 
#7 /home/thelittl/public_html/asia/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price.php(385): Mage_Catalog_Model_Resource_Product_Indexer_Price_Grouped->reindexAll() 
#8 /home/thelittl/public_html/asia/app/code/core/Mage/Index/Model/Indexer/Abstract.php(143): Mage_Catalog_Model_Resource_Product_Indexer_Price->reindexAll() 
#9 /home/thelittl/public_html/asia/app/code/core/Mage/Index/Model/Process.php(209): Mage_Index_Model_Indexer_Abstract->reindexAll() 
#10 /home/thelittl/public_html/asia/app/code/core/Mage/Index/Model/Process.php(255): Mage_Index_Model_Process->reindexAll() 
#11 /home/thelittl/public_html/asia/shell/indexer.php(158): Mage_Index_Model_Process->reindexEverything() 
#12 /home/thelittl/public_html/asia/shell/indexer.php(198): Mage_Shell_Compiler->run() 
#13 {main} 

不知道這是如何影響網站,如果它影響它以某種方式。

回答

3

感謝您的答案,我調試了查詢,發現問題到我的問題,也許它可以幫助別人。我改變:

應用程序/代碼/社區/布賴姆/ Groupedoptions /型號/資源/ EAV/Mysql4 /產品/索引/價格/ Grouped.php

大約55行,添加另一種說法有一未考慮的列:

'group_price' => new Zend_Db_Expr('NULL') 

並完成!

4

這可能不是缺失的列問題。 Insert value list does not match column list發生的最頻繁時有人通過數據庫抽象層字符串,當它期望和數組,或數組,當它期望一個字符串。

它看起來像一個人,(也許你)的

Brim_Groupedoptions 

模塊中增加了一些自定義代碼。我的猜測是對索引過程中使用的資源模型之一進行類重寫。檢查中 應用程序/代碼/社區/布賴姆/ Groupedoptions /型號/資源/ EAV/Mysql4 /產品/索引/價格查詢/ Grouped.php

上線76是通過在正確的列數和/或正確使用資源模型方法。

+0

你是傳奇先生!我的文件是在一個稍微不同的位置(也許是一箇舊版本,因爲它曾經是一個免費的模塊)看到這裏和在線沒有78 ..希望這可以幫助有人試圖噩夢magento升級... /應用程序/代碼/本地/ Brim/Groupedsimple/Model/Mysql4/Indexer/Price – 2012-05-25 14:10:43

+0

你讓我的一天!我們在一年前購買了Brim的擴展,因此我們沒有更新。昨天我將我們的測試系統從Magento 1.6.2.0升級到1.7.0.2,並在價格指數問題上蹣跚而行。非常感謝!乾杯Thorsten BTW:如果任何人使用Organicinternet的簡單配置產品擴展,並計劃升級到Magento 1.7.0.2應該有同樣的問題。 https://github.com/organicinternet/magento-configurable-simple提供了一個修復程序。 –