Sorry for the question duplication, but I couldn't find the answers to the question, so I am posting it again. I tried re indexing the magento 1.7.0.2 via admin. Since the server is shared server, I cannot run the indexer via shell script; though I tried running it through cron, but it didn't worked either. After running the indexer process, I got the following error logged in the the exception.log file:
2013-07-14T17:03:55+00:00 DEBUG (7): Exception message: Cannot create table without columns comments
Trace: #0 /home/username/public_html/demo/app/code/core/Mage/Catalog/Model/Resource/Category/Flat.php(604): Varien_Db_Adapter_Pdo_Mysql->createTable(Object(Varien_Db_Ddl_Table))
#1 /home/username/public_html/demo/app/code/core/Mage/Catalog/Model/Resource/Category/Flat.php(1418): Mage_Catalog_Model_Resource_Category_Flat->_createTable('4')
#2 /home/username/public_html/demo/app/code/core/Mage/Catalog/Model/Resource/Category/Flat.php(1431): Mage_Catalog_Model_Resource_Category_Flat->_createTables()
#3 /home/username/public_html/demo/app/code/core/Mage/Catalog/Model/Category/Indexer/Flat.php(246): Mage_Catalog_Model_Resource_Category_Flat->reindexAll()
#4 /home/username/public_html/demo/app/code/core/Mage/Index/Model/Process.php(209): Mage_Catalog_Model_Category_Indexer_Flat->reindexAll()
#5 /home/username/public_html/demo/app/code/core/Mage/Index/Model/Process.php(255): Mage_Index_Model_Process->reindexAll()
#6 /home/username/public_html/demo/app/code/core/Mage/Index/controllers/Adminhtml/ProcessController.php(178): Mage_Index_Model_Process->reindexEverything()
#7 /home/username/public_html/demo/app/code/core/Mage/Core/Controller/Varien/Action.php(419): Mage_Index_Adminhtml_ProcessController->massReindexAction()
#8 /home/username/public_html/demo/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('massReindex')
#9 /home/username/public_html/demo/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#10 /home/username/public_html/demo/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#11 /home/username/public_html/demo/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#12 /home/username/public_html/demo/index.php(87): Mage::run('', 'store')
#13 {main}
I don't know what the other solutions could be. I tried deleting lock files and reindexing again Also tried truncating the flat tables, it didn't worked either.
Any help is greatly appreciated.
try to run indexing with script file.
Create a file reindexing.php in the root.
<?php
require_once 'app/Mage.php';
$app = Mage::app('admin');
umask(0);
for ($index = 1; $index <= 8; $index++) {
$process = Mage::getModel('index/process')->load($index);
$process->reindexAll();
}
?>
Then clear the magento all cache and run this file as http://domain.com/reindexing.php
I tried all the things that I could find over the internet to solve this problem but nothing helped. So, I decided I will solve this problem on my own. I debugged and traced the error all the way to the database and I learned that the issue with reindexing, "Exception message: Cannot create table without columns comments" means some of the values of the column frontend_label in eav_attribute was null or 0. So first I needed to run the following query and add the frontend label if they are null or zero and add the value in the frontend label of the attributes whose value was null or zero.
Voila, and the issue was fixed:
Here are the queries that I ran to fix the issue:
List null values:
SELECT e.* FROM
eav_attribute e LEFT JOIN eav_entity_type et ON e.entity_type_id = et.entity_type_id WHERE et.entity_type_code = 'catalog_category' AND e.frontend_label is NULL
Then I fixed the null values:
SELECT e.* FROM
eav_attribute e LEFT JOIN eav_entity_type et ON e.entity_type_id = et.entity_type_id WHERE et.entity_type_code = 'catalog_category' AND e.frontend_label='0'
After that I could run the indexing process from admin or console and it ran flawlessly.
Hope you folks will find this solution helpful.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With