我尝试了一切我能想到的解决这个问题的方法,并且已经完成了修复重建索引问题所能找到的所有内容......我会采取任何可能的建议,我通过SSH / Shell尝试了一切,我试图截断所有可能的事情,删除我的var / locks文件清除缓存,并运行数据库修复工具(一些问题已修复)无济于事......仍然存在无法重新索引产品价格的相同问题。
[~/public_html/magento]# php shell/indexer.php --
reindexall
Product Attributes index was rebuilt successfully
Product Prices index process unknown error:
exception 'PDOException' with message 'SQLSTATE[21S01]: Insert value list doe
s not match column list: 1136 Column count doesn't match value count at row 1
' in /home/mystuff/public_html/magento/lib/Zend/Db/Statement/Pdo.php:228
Stack trace:
#0 /home/mystuff/public_html/magento/lib/Zend/Db/Statement/Pdo.php(228): PDO
Statement->execute(Array)
#1 /home/mystuff/public_html/magento/lib/Varien/Db/Statement/Pdo/Mysql.php(1
10): Zend_Db_Statement_Pdo->_execute(Array)
#2 /home/mystuff/public_html/magento/lib/Zend/Db/Statement.php(300): Varien_
Db_Statement_Pdo_Mysql->_execute(Array)
#3 /home/mystuff/public_html/magento/lib/Zend/Db/Adapter/Abstract.php(479):
Zend_Db_Statement->execute(Array)
#4 /home/mystuff/public_html/magento/lib/Zend/Db/Adapter/Pdo/Abstract.php(23
8): Zend_Db_Adapter_Abstract->query('INSERT INTO `sm...', Array)
#5 /home/mystuff/public_html/magento/lib/Varien/Db/Adapter/Pdo/Mysql.php(419
): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `sm...', Array)
#6 /home/mystuff/public_html/magento/app/code/local/Innoexts/StorePricing/Mo
del/Mysql4/Downloadable/Indexer/Price.php(125): Varien_Db_Adapter_Pdo_Mysql->
query('INSERT INTO `sm...')
#7 /home/mystuff/public_html/magento/app/code/core/Mage/Downloadable/Model/R
esource/Indexer/Price.php(47): Innoexts_StorePricing_Model_Mysql4_Downloadabl
e_Indexer_Price->_prepareFinalPriceData()
#8 /home/mystuff/public_html/magento/app/code/core/Mage/Catalog/Model/Resour
ce/Product/Indexer/Price.php(385): Mage_Downloadable_Model_Resource_Indexer_P
rice->reindexAll()
#9 /home/mystuff/public_html/magento/app/code/core/Mage/Index/Model/Indexer/
Abstract.php(143): Mage_Catalog_Model_Resource_Product_Indexer_Price->reindex
All()
#10 /home/mystuff/public_html/magento/app/code/core/Mage/Index/Model/Process
.php(209): Mage_Index_Model_Indexer_Abstract->reindexAll()
#11 /home/mystuff/public_html/magento/app/code/core/Mage/Index/Model/Process
.php(255): Mage_Index_Model_Process->reindexAll()
#12 /home/mystuff/public_html/magento/shell/indexer.php(158): Mage_Index_Mod
el_Process->reindexEverything()
#13 /home/mystuff/public_html/magento/shell/indexer.php(198): Mage_Shell_Com
piler->run()
#14 {main}
Next exception 'Zend_Db_Statement_Exception' with message 'SQLSTATE[21S01]: I
nsert value list does not match column list: 1136 Column count doesn't match
value count at row 1' in /home/mystuff/public_html/magento/lib/Zend/Db/State
ment/Pdo.php:234
Stack trace:
#0 /home/mystuff/public_html/magento/lib/Varien/Db/Statement/Pdo/Mysql.php(1
10): Zend_Db_Statement_Pdo->_execute(Array)
#1 /home/mystuff/public_html/magento/lib/Zend/Db/Statement.php(300): Varien_
Db_Statement_Pdo_Mysql->_execute(Array)
#2 /home/mystuff/public_html/magento/lib/Zend/Db/Adapter/Abstract.php(479):
Zend_Db_Statement->execute(Array)
#3 /home/mystuff/public_html/magento/lib/Zend/Db/Adapter/Pdo/Abstract.php(23
8): Zend_Db_Adapter_Abstract->query('INSERT INTO `sm...', Array)
#4 /home/mystuff/public_html/magento/lib/Varien/Db/Adapter/Pdo/Mysql.php(419
): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `sm...', Array)
#5 /home/mystuff/public_html/magento/app/code/local/Innoexts/StorePricing/Mo
del/Mysql4/Downloadable/Indexer/Price.php(125): Varien_Db_Adapter_Pdo_Mysql->
query('INSERT INTO `sm...')
#6 /home/mystuff/public_html/magento/app/code/core/Mage/Downloadable/Model/R
esource/Indexer/Price.php(47): Innoexts_StorePricing_Model_Mysql4_Downloadabl
e_Indexer_Price->_prepareFinalPriceData()
#7 /home/mystuff/public_html/magento/app/code/core/Mage/Catalog/Model/Resour
ce/Product/Indexer/Price.php(385): Mage_Downloadable_Model_Resource_Indexer_P
rice->reindexAll()
#8 /home/mystuff/public_html/magento/app/code/core/Mage/Index/Model/Indexer/
Abstract.php(143): Mage_Catalog_Model_Resource_Product_Indexer_Price->reindex
All()
#9 /home/mystuff/public_html/magento/app/code/core/Mage/Index/Model/Process.
php(209): Mage_Index_Model_Indexer_Abstract->reindexAll()
#10 /home/mystuff/public_html/magento/app/code/core/Mage/Index/Model/Process
.php(255): Mage_Index_Model_Process->reindexAll()
#11 /home/mystuff/public_html/magento/shell/indexer.php(158): Mage_Index_Mod
el_Process->reindexEverything()
#12 /home/mystuff/public_html/magento/shell/indexer.php(198): Mage_Shell_Com
piler->run()
#13 {main}
Catalog URL Rewrites index was rebuilt successfully
Product Flat Data index was rebuilt successfully
Category Flat Data index was rebuilt successfully
Category Products index was rebuilt successfully
Catalog Search Index index was rebuilt successfully
Stock Status index was rebuilt successfully
答案 0 :(得分:0)
从上面的错误日志中看起来似乎缺少一些列, 插入值列表doe 不匹配列列表:1136列数与第1行的值计数不匹配。
检查此答案是否对您有所帮助。
https://stackoverflow.com/a/18548136/857855
另外,检查价格指数表并将列与工作的magento副本进行比较,
价格指数表列表, http://makandracards.com/magento/8285-product-price-index
在这里检查ans 6, http://www.magentocommerce.com/boards/viewthread/280202/#6
希望它有所帮助!
答案 1 :(得分:0)
同样的问题。我认为由于有一个错误的模块,在一些表中添加了一些列。我得到它的方式,:
访问shell(ssh)
我使用shell(ssh)和以下命令
阅读输出
然后,在shell输出的帮助下,我把每个表都显示出问题。 (这里我的意思是我一步一步走了:我第一次运行命令,输出显示有问题的表,我用下面的程序修复它。然后,我运行了2d命令,另一个表是显示等。)
因此,对于每个表,我都去了phpmyadmin并删除了它(整个表:数据+结构)。
然后我去了magento(另一个网站)的工作数据库并导出了表格。然后,我将它导入非工作数据库。
过了一会儿(以这种方式删除了5或6个表),命令shell输出不再显示错误。它成功运行了索引器进程。并且,神奇:我的产品在他们的类别中重新申请。
我不确定是对的,但据我所知,价格指数表的结构已经损坏。此过程允许使用适当的重置它们。无论它们是否是非正确的数据(我有),因为这是索引器进程从产品目录中重建数据的目的。
好运!