Php Magento类别平面数据将不会重新编制索引错误“重新编制索引过程出现问题。”

Php Magento类别平面数据将不会重新编制索引错误“重新编制索引过程出现问题。”,php,mysql,zend-framework,magento,Php,Mysql,Zend Framework,Magento,我最近将magento安装的1.5.0.1版移动到live server,但是前端没有显示任何产品。检查索引后,我发现Category Flat数据索引需要重新编制索引,但是当尝试重新编制索引时,我会看到一个错误通知框,上面写着“重新编制索引的过程中出现了问题。” 到目前为止,我已经尝试了以下方法 重置文件夹的文件权限755,文件的文件权限664 找到-f型-exec chmod 644{}\ 找到-d型-exec chmod 755{}\ 删除var文件夹的内容,包括缓存和锁定文件夹 尝试使用

我最近将magento安装的1.5.0.1版移动到live server,但是前端没有显示任何产品。检查索引后,我发现Category Flat数据索引需要重新编制索引,但是当尝试重新编制索引时,我会看到一个错误通知框,上面写着“重新编制索引的过程中出现了问题。”

到目前为止,我已经尝试了以下方法

重置文件夹的文件权限755,文件的文件权限664

找到-f型-exec chmod 644{}\

找到-d型-exec chmod 755{}\

删除var文件夹的内容,包括缓存和锁定文件夹

尝试使用public_html/shell中的以下命令通过控制台手动处理索引

php indexer.php reindexall

我已经检查了错误日志,下面是

2011-09-26T08:16:11+00:00 DEBUG (7): Exception message: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '
`store_id` smallint(5) unsigned not null default '0',
`all_children` text defau' at line 10
Trace: #0 /home/bboutique/www.bassboutique.co.uk/public_html/lib/Zend/Db/Statement.php(300): Zend_Db_Statement_Pdo->_execute(Array)
#1 /home/bboutique/www.bassboutique.co.uk/public_html/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#2 /home/bboutique/www.bassboutique.co.uk/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('CREATE TABLE `c...', Array)
#3 /home/bboutique/www.bassboutique.co.uk/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(333): Zend_Db_Adapter_Pdo_Abstract->query('CREATE TABLE `c...', Array)
#4 /home/bboutique/www.bassboutique.co.uk/public_html/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Category/Flat.php(526): Varien_Db_Adapter_Pdo_Mysql->query('CREATE TABLE `c...')
#5 /home/bboutique/www.bassboutique.co.uk/public_html/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Category/Flat.php(433): Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Flat->_createTable('1')
#6 /home/bboutique/www.bassboutique.co.uk/public_html/app/code/core/Mage/Catalog/Model/Category/Indexer/Flat.php(237): Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Flat->rebuild()
#7 /home/bboutique/www.bassboutique.co.uk/public_html/app/code/core/Mage/Index/Model/Process.php(139): Mage_Catalog_Model_Category_Indexer_Flat->reindexAll()
#8 /home/bboutique/www.bassboutique.co.uk/public_html/app/code/core/Mage/Index/Model/Process.php(167): Mage_Index_Model_Process->reindexAll()
#9 /home/bboutique/www.bassboutique.co.uk/public_html/app/code/core/Mage/Index/controllers/Adminhtml/ProcessController.php(124): Mage_Index_Model_Process->reindexEverything()
#10 /home/bboutique/www.bassboutique.co.uk/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Index_Adminhtml_ProcessController->reindexProcessAction()
#11 /home/bboutique/www.bassboutique.co.uk/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(253): Mage_Core_Controller_Varien_Action->dispatch('reindexProcess')
#12 /home/bboutique/www.bassboutique.co.uk/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#13 /home/bboutique/www.bassboutique.co.uk/public_html/app/code/core/Mage/Core/Model/App.php(340): Mage_Core_Controller_Varien_Front->dispatch()
#14 /home/bboutique/www.bassboutique.co.uk/public_html/app/Mage.php(627): Mage_Core_Model_App->run(Array)
#15 /home/bboutique/www.bassboutique.co.uk/public_html/index.php(80): Mage::run('', 'store')
#16 {main}
任何帮助都将不胜感激

谢谢


Ian

我在将Magento的样本数据加载到Magento 1.5.1.0时遇到了相同的错误,尽管Varien说,他们的样本数据并不适用于所有Magento版本

在/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Category/Flat.php中,我在第549行找到了以下内容:

switch ($column['DATA_TYPE']) { case 'smallint': case 'int': $_type = $column['DATA_TYPE'] . '(11)'; $_is_unsigned = (bool)$column['UNSIGNED']; if ($column['DEFAULT'] === '') { $column['DEFAULT'] = null; } break; case 'varchar':......................... “timestamp”没有case语句;Magento在Magento 1.6.1.0中的“updated_at”和“created_at”列中使用的数据类型

我做了一些alter table语句,将catalog\u category\u实体和catalog\u product\u实体中的“timestamp”列更改为“datetime”,索引问题消失了

我现在已经对示例数据中的所有“timestamp”列进行了查找和替换,以使其与1.5.1.0兼容


我希望这对某些人有所帮助:

我遇到了一些流氓SQL语句的问题,这些语句需要我深入到数据库方法中,然后打印出语句,以便我可以看到问题所在。您可能需要抛出一些打印$sq;如@jprofitt所说,转到file/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Category/Flat.php,第526行和echo生成的create table查询。