【问题标题】:magento reindexing just the prices tried every solutionmagento 重新索引只是价格尝试了所有解决方案
【发布时间】:2014-06-20 16:42:45
【问题描述】:

我尝试了我能想到的所有方法来解决这个问题,并且一直在尝试解决重新索引问题的所有方法......我会接受任何可能的建议,我通过 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

【问题讨论】:

    标签: database magento reindex


    【解决方案1】:

    从您上面的错误日志看来,有些列丢失了, 插入值列表 doe s not match column list: 1136 Column count does not match value count at row 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

    希望对你有帮助!

    【讨论】:

    • 在让我的产品价格重新索引/任何其他想法方面仍然存在问题?>
    • 当我尝试重新索引价格 www.blazerproducts.com/sql.txt 时,这是我的调试文件中的 sql.txt
    • 在我的情况下,这个问题是由社区扩展(OrganicInternet/SimpleConfigurableProducts)引起的,它重写了产品价格索引器,但与当前 magento 的价格索引不兼容(它不会为 group_price 创建值和base_group_price catalog_product_index_price_final_idx table 的列。所以我建议你尝试一个接一个地禁用社区扩展并尝试重新启动索引过程。这样你会发现它是否是一个magento连接模块导致你的问题.
    【解决方案2】:

    同样的问题。我认为由于一个错误的模块,它在某些表中添加了一些列。我得到它的方式,:

    1. 访问 shell (ssh)

      我使用 shell (ssh) 和以下命令

      php /home/mystuff/public_html/magento/shell/indexer.php -reindexall

    2. 读取输出

    然后,在 shell 中的输出的帮助下,我取出了每个显示问题的表。 (我的意思是我一步一步地运行:我第一次运行命令,输出显示一个有问题的表,我用下面的程序修复它。然后,我运行了第二次命令,另一个表是显示等)

    1. 删除有问题的表

    所以,对于每一个表,我都去phpmyadmin删除了它(整个表:数据+结构)。

    1. 从另一个安装中导入工作表

    然后我去了一个magento(另一个网站)的工作数据库并导出了表格。然后,我将它导入到非工作数据库中。

    1. 结论

    一段时间后(以这种方式删除了 5 或 6 个表),命令 shell 输出不再显示错误。它成功地运行了索引器进程。而且,神奇:我的产品重新出现在它们的类别中。

    1. 补充说明

    我不确定是否正确,但据我了解,价格指数表的结构已损坏。此过程允许使用正确的重置它们。无论它们是否是其中的非正确数据(我有),因为这是索引器进程从产品目录中重建数据的目的。

    1. 在执行此操作之前:不要忘记制作两个网站数据库(非工作数据库和工作数据库)的本地副本。这样您就不会害怕出错了。

    祝你好运!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-06-06
      • 2019-08-16
      • 2018-11-07
      • 2015-02-24
      • 2016-04-20
      • 2020-10-05
      相关资源
      最近更新 更多