Magento在Admin中使用扁平目录类别已灰显,并且可以';t变化值

Magento在Admin中使用扁平目录类别已灰显,并且可以';t变化值,magento,Magento,我们有Magento社区版本1.9.0.1。我们从管理系统配置前端激活了使用平面目录类别。当我们激活并试图重新编制索引时,它给了我们一条错误消息,即缺少目录\类别\平面\存储\ 1。现在在管理中使用平面目录类别已灰显,无法更改。然后我们手动创建了它,但之后我们会收到以下错误消息: Next exception 'Zend_Db_Statement_Exception' with message 'SQLSTATE[23000]: Integrity constraint violation: 1

我们有Magento社区版本1.9.0.1。我们从
管理
系统
配置
前端
激活了使用平面目录类别。当我们激活并试图重新编制索引时,它给了我们一条错误消息,即缺少
目录\类别\平面\存储\ 1
。现在在管理中使用平面目录类别已灰显,无法更改。然后我们手动创建了它,但之后我们会收到以下错误消息:

Next exception 'Zend_Db_Statement_Exception' with message 'SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`catalog_category_flat_store_1`, CONSTRAINT `FK_CAT_CTGR_FLAT_STORE_1_ENTT_ID_CAT_CTGR_ENTT_ENTT_ID` FOREIGN KEY (`entity_id`) REFERENCES `catalog_category_entity` (`entity_id`) )' in /www/lib/Zend/Db/Statement/Pdo.php:234
Stack trace:
#0 /www/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /www/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /www/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#3 /www/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO `ca...', Array)
#4 /www/lib/Varien/Db/Adapter/Pdo/Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `ca...', Array)
#5 /www/lib/Varien/Db/Adapter/Pdo/Mysql.php(1998): Varien_Db_Adapter_Pdo_Mysql->query('INSERT INTO `ca...', Array)
#6 /www/lib/Varien/Db/Adapter/Pdo/Mysql.php(1971): Varien_Db_Adapter_Pdo_Mysql->insertArray('catalog_categor...', Array, Array)
#7 /www/app/code/core/Mage/Catalog/Model/Resource/Category/Flat.php(539): Varien_Db_Adapter_Pdo_Mysql->insertMultiple('catalog_categor...', Array)
#8 /www/app/code/core/Mage/Catalog/Model/Resource/Category/Flat.php(1482): Mage_Catalog_Model_Resource_Category_Flat->rebuild()
#9 /www/app/code/core/Mage/Catalog/Model/Category/Indexer/Flat.php(260): Mage_Catalog_Model_Resource_Category_Flat->reindexAll()
#10 /www/app/code/core/Mage/Index/Model/Process.php(210): Mage_Catalog_Model_Category_Indexer_Flat->reindexAll()
#11 /www/app/code/core/Mage/Index/Model/Process.php(258): Mage_Index_Model_Process->reindexAll()
#12 /www/shell/indexer.php(166): Mage_Index_Model_Process->reindexEverything()
#13 /www/shell/indexer.php(212): Mage_Shell_Compiler->run()
无法弄清楚到底是什么问题以及从哪里开始。日志什么也没说。我们禁用平面产品并截断和重新编制索引,但仍然使用平面目录类别下拉列表禁用且无法更改值。所以,我唯一的选择是重新索引使用平面目录类别,直到它不会显示在我们的网站菜单


任何帮助都将不胜感激。

可能目录\u类别\u平面\u商店\u 1已损坏。我会将该表重命名为catalog\u category\u flat\u store\u 1\u OLD(例如),然后从ssh尝试使用
php-f indexer.php--reindex catalog\u category\u flat
再次从文件夹/shell重新编制索引。必须使用您的类别重新生成表。

我通过替换

$app = Mage::app(0);


在我的导入脚本中。

这是一个与编程相关的问题吗?现在它给出了这个错误。.下一个异常“Zend\u Db\u语句\u异常”带有消息“SQLSTATE[HY000]:一般错误:1005无法创建表“france\u mag2.catalog\u category\u flat\u store\u 1”(错误号:121)'在/home/francedv/www/lib/Zend/Db/Statement/Pdo.php:234中,查找与整个数据库或索引配置错误有关的内容。我建议您尝试在Google中搜索“magento无法创建表格平面”,因为它可以是任何内容(权限、innodb、索引…)
Mage::app("admin");