首页 文章

Magento - 无法重新索引产品价格

提问于
浏览
1

强大的textI我试图将新产品添加到我的商店,但他们没有出现 . 我尽我所能,但在尝试重新索引所有数据时,产品价格产生了错误 . 我得到了“重建索引过程出现问题” . 我尝试删除var / cache和var / locks(但实际上我似乎无法清空/缓存 - 我不知道它是否应该像这样) . 我从reindex得到的输出如下:

产品价格索引流程未知错误:异常'PDOException',消息'SQLSTATE [21S01]:插入值列表与列列表不匹配:1136列计数与/ chroot / home / xsmokeco /中第1行的值计数不匹配xsmoke.com/html/lib/Zend/Db/Statement/Pdo.php:228堆栈跟踪:0 /chroot/home/xsmokeco/xsmoke.com/html/lib/Zend/Db/Statement/Pdo.php(228) :PDOStatement-> execute(Array)1 /chroot/home/xsmokeco/xsmoke.com/html/lib/Varien/Db/Statement/Pdo/Mysql.php(110):Zend_Db_Statement_Pdo - > _ execute(Array)2 / chroot / home / xsmokeco / xsmoke.com / html / lib / Zend / Db / Statement.php(300):Varien_Db_Statement_Pdo_Mysql - > _ execute(Array)3 /chroot/home/xsmokeco/xsmoke.com/html/lib/Zend/Db/ Adapter / Abstract.php(479):Zend_Db_Statement-> execute(Array)4 /chroot/home/xsmokeco/xsmoke.com/html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238):Zend_Db_Adapter_Abstract->查询('INSERT INTOca ...',数组)5 /chroot/home/xsmokeco/xsmoke.com/html/lib/Varien/Db/Adapter/Pdo/Mysql.php(419):Zend_Db_Adapter_Pdo_Abst ract-> query('INSERT INTOca ...',Array)6 /chroot/home/xsmokeco/xsmoke.com/html/app/code/local/Innoexts/StorePricing/Model/Mysql4/Downloadable/Indexer/Price .php(125):Varien_Db_Adapter_Pdo_Mysql-> query('INSERT INTOca ...')7 /chroot/home/xsmokeco/xsmoke.com/html/app/code/core/Mage/Downloadable/Model/Resource/Indexer /Price.php(47):Innoexts_StorePricing_Model_Mysql4_Downloadable_Indexer_Price - > _ prepareFinalPriceData()8 /chroot/home/xsmokeco/xsmoke.com/html/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price.php( 385):Mage_Downloadable_Model_Resource_Indexer_Price-> reindexAll()9 /chroot/home/xsmokeco/xsmoke.com/html/app/code/core/Mage/Index/Model/Indexer/Abstract.php(143):Mage_Catalog_Model_Resource_Product_Indexer_Price-> reindexAll() 10 /chroot/home/xsmokeco/xsmoke.com/html/app/code/core/Mage/Index/Model/Process.php(209):Mage_Index_Model_Indexer_Abstract-> reindexAll()11 /chroot/home/xsmokeco/xsmoke.com /html/app/code/core/Mage/Index/Model/Process.php(255):Mage_Index_M odel_Process-> reindexAll()12 /chroot/home/xsmokeco/xsmoke.com/html/shell/indexer.php(158):Mage_Index_Model_Process-> reindexEverything()13 /chroot/home/xsmokeco/xsmoke.com/html/shell /indexer.php(198):Mage_Shell_Compiler-> run()14 {main}下一个异常'Zend_Db_Statement_Exception',消息'SQLSTATE [21S01]:插入值列表与列列表不匹配:1136列计数与值计数不匹配/chroot/home/xsmokeco/xsmoke.com/html/lib/Zend/Db/Statement/Pdo.php:234中的第1行堆栈跟踪:0 /chroot/home/xsmokeco/xsmoke.com/html/lib/Varien /Db/Statement/Pdo/Mysql.php(110):Zend_Db_Statement_Pdo - > _ execute(Array)1 /chroot/home/xsmokeco/xsmoke.com/html/lib/Zend/Db/Statement.php(300):Varien_Db_Statement_Pdo_Mysql- > _execute(Array)2 /chroot/home/xsmokeco/xsmoke.com/html/lib/Zend/Db/Adapter/Abstract.php(479):Zend_Db_Statement-> execute(Array)3 / chroot / home / xsmokeco / xsmoke .com / html / lib / Zend / Db / Adapter / Pdo / Abstract.php(238):Zend_Db_Adapter_Abstract-> query('INSERT INTOca ...',Arra y)4 /chroot/home/xsmokeco/xsmoke.com/html/lib/Varien/Db/Adapter/Pdo/Mysql.php(419):Zend_Db_Adapter_Pdo_Abstract-> query('INSERT INTOca ...',Array) 5 /chroot/home/xsmokeco/xsmoke.com/html/app/code/local/Innoexts/StorePricing/Model/Mysql4/Downloadable/Indexer/Price.php(125):Varien_Db_Adapter_Pdo_Mysql-> query('INSERT INTOca . ..')6 /chroot/home/xsmokeco/xsmoke.com/html/app/code/core/Mage/Downloadable/Model/Resource/Indexer/Price.php(47):Innoexts_StorePricing_Model_Mysql4_Downloadable_Indexer_Price - > _ prepareFinalPriceData()7 / chroot /home/xsmokeco/xsmoke.com/html/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price.php(385):Mage_Downloadable_Model_Resource_Indexer_Price-> reindexAll()8 / chroot / home / xsmokeco / xsmoke.com/html/app/code/core/Mage/Index/Model/Indexer/Abstract.php(143):Mage_Catalog_Model_Resource_Product_Indexer_Price-> reindexAll()9 /chroot/home/xsmokeco/xsmoke.com/html/app/code /core/Mage/Index/Model/Process.php(209):Mage_Index_Model_Indexer_Abstract-> reindex全部()10/chroot/home/xsmokeco/xsmoke.com/html/app/code/core/Mage/Index/Model/Process.php(255):Mage_Index_Model_Process-> reindexAll()11 /chroot/home/xsmokeco/xsmoke.com/ html / shell / indexer.php(158):Mage_Index_Model_Process-> reindexEverything()12 /chroot/home/xsmokeco/xsmoke.com/html/shell/indexer.php(198):Mage_Shell_Compiler-> run()13

我有点害怕改变数据库中的任何内容,因此我想在这里寻求帮助 . 我正在使用magento 1.7,我从未更新过它 . 谢谢你提前

2 回答

  • 0

    我得到了这样的问题它来自扩展 . 也许你应该尝试Axel方法 . 备份和卸载innotext扩展并尝试重新索引 .

  • 1

    我使用传统(有效)的方式将几个Magento CE(1.4)升级到Magento EE(1.11) . 但我发现重新索引价格导致Magento无法做到这一点时,存在一个重要问题 .

    阅读Magento Boards上的这篇文章我发现问题(在我的情况下)与catalog_product_entity_tier_price表中的错误有关,其中一些条目与不再存在的产品有关 . 这是实际的错误,当试图重新索引产品价格时,Magento会抛出这样的信息:

    There was a problem with reindexing process.
    

    如何解决它

    所以你想解决这个问题 . 您必须删除catalog_product_entity_tier_price表中与不再存在的产品相关的所有条目 . 您可以手动执行此操作,也可以使用我创建的以下脚本 . 它真的很容易使用 .

    Download the script from here
    

    在该文件中,您将找到:

    The script: clean_tier_prices.php
    A library to connect in a really easy way to the db
    

    请遵循以下步骤:

    Make a copy of your database (just in case)
    Uncompress the zip file in your magento base directory
    Edit the lib/db.php file and put there your connection settings (db user, user pass and db)
    Open the browser and go to http://yourmagentopath.com/clean_tier_prices.php
    You’ll see wich references have been deleted from the catalog_product_entity_tier_price table
    Try reindexing again in your Magento backoffice
    

    重要说明:您使用此脚本需要您自担风险 . 在应用之前制作数据库的副本 . 如果你改进了这个,请与我和世界其他地方分享! download from here

相关问题