重新索引“类别平面数据”时出现Magento错误

时间:2014-07-28 05:48:08

标签: php magento

当我尝试重新索引“类别平面数据”时,我遇到了一个奇怪的问题,我收到此错误 - “重建索引过程出现问题。”

这是exception.log -

DEBUG (7): Exception message: Notice: Undefined offset: 162  in /home/user**/public_html/WEBSITES/*****/app/code/core/Mage/Catalog/Model/Resource/Category/Flat.php on line 833
Trace: #0 /home/user**/public_html/WEBSITES/*****/app/code/core/Mage/Catalog/Model/Resource/Category/Flat.php(833): mageCoreErrorHandler(8, 'Undefined offse...', '/home/user**/...', 833, Array)
#1 /home/user**/public_html/WEBSITES/*****/app/code/core/Mage/Catalog/Model/Resource/Category/Flat.php(528): Mage_Catalog_Model_Resource_Category_Flat->_getAttributeValues(Array, '1')
#2 /home/user**/public_html/WEBSITES/*****/app/code/core/Mage/Catalog/Model/Resource/Category/Flat.php(1482): Mage_Catalog_Model_Resource_Category_Flat->rebuild()
#3 /home/user**/public_html/WEBSITES/*****/app/code/core/Mage/Catalog/Model/Category/Indexer/Flat.php(260): Mage_Catalog_Model_Resource_Category_Flat->reindexAll()
#4 /home/user**/public_html/WEBSITES/*****/app/code/core/Mage/Index/Model/Process.php(210): Mage_Catalog_Model_Category_Indexer_Flat->reindexAll()
#5 /home/user**/public_html/WEBSITES/*****/app/code/core/Mage/Index/Model/Process.php(258): Mage_Index_Model_Process->reindexAll()
#6 /home/user**/public_html/WEBSITES/*****/app/code/core/Mage/Index/controllers/Adminhtml/ProcessController.php(127): Mage_Index_Model_Process->reindexEverything()
#7 /home/user**/public_html/WEBSITES/*****/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Index_Adminhtml_ProcessController->reindexProcessAction()
#8 /home/user**/public_html/WEBSITES/*****/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('reindexProcess')
#9 /home/user**/public_html/WEBSITES/*****/app/code/community/Mage/Core/Controller/Varien/Front.php(223): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#10 /home/user**/public_html/WEBSITES/*****/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#11 /home/user**/public_html/WEBSITES/*****/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#12 /home/user**/public_html/WEBSITES/*****/index.php(94): Mage::run('', 'store')
#13 {main}

**我还注意到Configuration-> Catalog-> Frontend-> Use Flat Catalog Category设置为“No”,因为该选项被禁用,我无法将其更改为“Yes”。 / p>

请帮我解决这个奇怪的错误。

1 个答案:

答案 0 :(得分:4)

您的编辑是否已停用?尝试禁用编译并尝试重新编制索引。 (系统 - >工具 - >编译)

如果索引仍然无效,那么再次。清除缓存并锁定文件(magento root下的/ var / cache& / var / lock)。然后再次尝试重新编制索引。

如果再次失败,则数据库中可能存在完整性约束错误。您必须删除违反完整性约束的行,然后才能正确地重新索引。

使用以下命令从终端重新编制索引。

php indexer.php --reindexall