2012-05-07 75 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提供了一个修复程序。 –