Magento Reindex在"类别产品上的错误"

时间:2014-06-19 04:21:59

标签: magento magento-1.8 magmi

使用MAGMI将我的所有产品导入我的Magento站点后,catalog_category_product索引在从命令行运行indexer.php时出现以下错误。 (php -f indexer.php -- --reindex catalog_category_product).

Category Products index process unknown error:
exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1103 Incorrect table name ''' in /srv/www/magento1-8/lib/Zend/Db/Statement/Pdo.php:228
Stack trace:
#0 /srv/www/magento1-8/lib/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array)
#1 /srv/www/magento1-8/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#2 /srv/www/magento1-8/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#3 /srv/www/magento1-8/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#4 /srv/www/magento1-8/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('DELETE FROM ``', Array)
#5 /srv/www/magento1-8/lib/Varien/Db/Adapter/Pdo/Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('DELETE FROM ``', Array)
#6 /srv/www/magento1-8/lib/Zend/Db/Adapter/Abstract.php(661): Varien_Db_Adapter_Pdo_Mysql->query('DELETE FROM ``')
#7 /srv/www/magento1-8/app/code/core/Mage/Catalog/Model/Resource/Category/Indexer/Product.php(941): Zend_Db_Adapter_Abstract->delete(NULL)
#8 /srv/www/magento1-8/app/code/core/Mage/Index/Model/Indexer/Abstract.php(143): Mage_Catalog_Model_Resource_Category_Indexer_Product->reindexAll()
#9 /srv/www/magento1-8/app/code/core/Mage/Index/Model/Process.php(210): Mage_Index_Model_Indexer_Abstract->reindexAll()
#10 /srv/www/magento1-8/app/code/core/Mage/Index/Model/Process.php(258): Mage_Index_Model_Process->reindexAll()
#11 /srv/www/magento1-8/shell/indexer.php(166): Mage_Index_Model_Process->reindexEverything()
#12 /srv/www/magento1-8/shell/indexer.php(212): Mage_Shell_Compiler->run()
#13 {main}

Next exception 'Zend_Db_Statement_Exception' with message 'SQLSTATE[42000]: Syntax error or access violation: 1103 Incorrect table name ''' in /srv/www/magento1-8/lib/Zend/Db/Statement/Pdo.php:234
Stack trace:
#0 /srv/www/magento1-8/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /srv/www/magento1-8/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /srv/www/magento1-8/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#3 /srv/www/magento1-8/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('DELETE FROM ``', Array)
#4 /srv/www/magento1-8/lib/Varien/Db/Adapter/Pdo/Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('DELETE FROM ``', Array)
#5 /srv/www/magento1-8/lib/Zend/Db/Adapter/Abstract.php(661): Varien_Db_Adapter_Pdo_Mysql->query('DELETE FROM ``')
#6 /srv/www/magento1-8/app/code/core/Mage/Catalog/Model/Resource/Category/Indexer/Product.php(941): Zend_Db_Adapter_Abstract->delete(NULL)
#7 /srv/www/magento1-8/app/code/core/Mage/Index/Model/Indexer/Abstract.php(143): Mage_Catalog_Model_Resource_Category_Indexer_Product->reindexAll()
#8 /srv/www/magento1-8/app/code/core/Mage/Index/Model/Process.php(210): Mage_Index_Model_Indexer_Abstract->reindexAll()
#9 /srv/www/magento1-8/app/code/core/Mage/Index/Model/Process.php(258): Mage_Index_Model_Process->reindexAll()
#10 /srv/www/magento1-8/shell/indexer.php(166): Mage_Index_Model_Process->reindexEverything()
#11 /srv/www/magento1-8/shell/indexer.php(212): Mage_Shell_Compiler->run()
#12 {main}

在将这些新数据插入我的网站之前,我曾使用MAGMI Clear Catalog v1.0.3工具清除目录,删除了未使用的attribute_sets并添加了新属性和attribute_sets。

非常感谢有关如何解决此问题的任何建议。

由于

1 个答案:

答案 0 :(得分:3)

只需导入此sql即可重置它帮助我的类别(v 1.7) http://pastebin.com/iCSH64zb

如果1.8具有另一个表结构,只需将新版本的magento与您的版本一起安装到新数据库并导出以下表: catalog_category_entity catalog_category_entity_datetime catalog_category_entity_decimal catalog_category_entity_int catalog_category_entity_text catalog_category_entity_varchar

并将其导入您的数据库(之前进行备份)