Microsoft Azure Open Source Development Support Team Blog

Support for Open Source Technologies on Microsoft Azure App Service

Magento Indexing and Root Category on Microsoft Azure

Overview

If you recently installed Magento through the Azure Portal and found that reindexing is not working properly, you will want to ensure that the Root Category is selected.

If the root category is not set, you will encounter this message when trying to reindex: There was a problem with reindexing process.”  which can often result in the exception shown below.

2015-04-16T13:31:17+00:00 DEBUG (7): Exception message: SQLSTATE[42000]: Syntax error or access violation: 1103 Incorrect table name ”
Trace: #0 D:\home\site\wwwroot\lib\Varien\Db\Statement\Pdo\Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 D:\home\site\wwwroot\app\code\core\Zend\Db\Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 D:\home\site\wwwroot\lib\Zend\Db\Adapter\Abstract.php(480): Zend_Db_Statement->execute(Array)
#3 D:\home\site\wwwroot\lib\Zend\Db\Adapter\Pdo\Abstract.php(238): Zend_Db_Adapter_Abstract->query(‘DELETE FROM “’, Array)
#4 D:\home\site\wwwroot\lib\Varien\Db\Adapter\Pdo\Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query(‘DELETE FROM “’, Array)
#5 D:\home\site\wwwroot\lib\Zend\Db\Adapter\Abstract.php(664): Varien_Db_Adapter_Pdo_Mysql->query(‘DELETE FROM “’)
#6 D:\home\site\wwwroot\app\code\core\Mage\Catalog\Model\Resource\Category\Indexer\Product.php(941): Zend_Db_Adapter_Abstract->delete(NULL)
#7 D:\home\site\wwwroot\app\code\core\Mage\Index\Model\Indexer\Abstract.php(143): Mage_Catalog_Model_Resource_Category_Indexer_Product->reindexAll()
#8 D:\home\site\wwwroot\app\code\core\Mage\Index\Model\Process.php(210): Mage_Index_Model_Indexer_Abstract->reindexAll()
#9 D:\home\site\wwwroot\app\code\core\Mage\Index\Model\Process.php(258): Mage_Index_Model_Process->reindexAll()
#10 D:\home\site\wwwroot\app\code\core\Mage\Index\controllers\Adminhtml\ProcessController.php(127): Mage_Index_Model_Process->reindexEverything()
#11 D:\home\site\wwwroot\app\code\core\Mage\Core\Controller\Varien\Action.php(418): Mage_Index_Adminhtml_ProcessController->reindexProcessAction()
#12 D:\home\site\wwwroot\app\code\core\Mage\Core\Controller\Varien\Router\Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch(‘reindexProcess’)
#13 D:\home\site\wwwroot\app\code\core\Mage\Core\Controller\Varien\Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#14 D:\home\site\wwwroot\app\code\core\Mage\Core\Model\App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#15 D:\home\site\wwwroot\app\Mage.php(684): Mage_Core_Model_App->run(Array)
#16 D:\home\site\wwwroot\index.php(87): Mage::run(”, ‘store’)
#17 {main}

To solve this issue, make sure your Root Category is selected.


To select your Root Category, follow these steps:

Step 1. In the System Menu, select Configuration

Step 2. Click on “Manage Stores”

You can find it at the top-left, under “Current Configuration Scope”.

Step 3. Select Main Website Store

Step 4. Set the Root Category

Select the drop-down for “Root Category” and select “Default Category”

Step 5. Save the store

Click “Save Store” at the top-right corner

Step 6. Verify indexing works!

Select System –>Index Management

Step 7. Select Indexes

Select “Catalog URL Rewrites” and “Category Products”

Step 8. Reindex Data

At this point, your index management should be successful without errors.

 

Here’s a feedback page for Azure. Please let us know how we can improve Azure!