4

I'm using Magento CE 1.7. here is the error I get suddenly, each time I access the "index management" screen (so I canot access it anymore), or each time I try to update a product (so i can't save product anymore) and each time I try to enable/disable a module from the back end:

Indexer model is not defined. 

Trace:
#0 /home/webscoot/www/app/code/core/Mage/Index/Model/Process.php(306): Mage::throwException('Indexer model is not defined.')
#1 /home/webscoot/www/app/code/core/Mage/Index/Block/Adminhtml/Process/Grid.php(72): Mage_Index_Model_Process->getIndexer()
#2 /home/webscoot/www/app/code/core/Mage/Adminhtml/Block/Widget/Grid.php(534): Mage_Index_Block_Adminhtml_Process_Grid->_afterLoadCollection()
#3 /home/webscoot/www/app/code/core/Mage/Index/Block/Adminhtml/Process/Grid.php(62): Mage_Adminhtml_Block_Widget_Grid->_prepareCollection()
#4 /home/webscoot/www/app/code/core/Mage/Adminhtml/Block/Widget/Grid.php(626): Mage_Index_Block_Adminhtml_Process_Grid->_prepareCollection()
#5 /home/webscoot/www/app/code/core/Mage/Adminhtml/Block/Widget/Grid.php(632): Mage_Adminhtml_Block_Widget_Grid->_prepareGrid()
#6 /home/webscoot/www/app/code/core/Mage/Core/Block/Abstract.php(862): Mage_Adminhtml_Block_Widget_Grid->_beforeToHtml()
#7 /home/webscoot/www/app/code/core/Mage/Core/Block/Abstract.php(582): Mage_Core_Block_Abstract->toHtml()
#8 /home/webscoot/www/app/code/core/Mage/Core/Block/Abstract.php(526): Mage_Core_Block_Abstract->_getChildHtml('grid', true)
#9 /home/webscoot/www/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Container.php(77): Mage_Core_Block_Abstract->getChildHtml('grid')
#10 /home/webscoot/www/app/design/adminhtml/base/default/template/widget/grid/container.phtml(36): Mage_Adminhtml_Block_Widget_Grid_Container->getGridHtml()
#11 /home/webscoot/www/app/code/core/Mage/Core/Block/Template.php(241): include('/home/webscoot/www/app/design/adminhtml/base/default/template/widget/grid/container.phtml')
#12 /home/webscoot/www/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('adminhtml/base/default/template/widget/grid/container.phtml')
#13 /home/webscoot/www/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#14 /home/webscoot/www/app/code/core/Mage/Adminhtml/Block/Template.php(81): Mage_Core_Block_Template->_toHtml()
#15 /home/webscoot/www/app/code/core/Mage/Adminhtml/Block/Widget/Container.php(308): Mage_Adminhtml_Block_Template->_toHtml()
#16 /home/webscoot/www/app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Adminhtml_Block_Widget_Container->_toHtml()
#17 /home/webscoot/www/app/code/core/Mage/Core/Block/Text/List.php(43): Mage_Core_Block_Abstract->toHtml()

etc

1
  • Did you find an answer here? Please mark it as solution. – Fabian Blechschmidt May 8 '13 at 14:10
20

Most probably you have a declared indexer that does not have a model associated to it. There is also the chance that if you have the cache enabled, this cache can be corrupted. (but I doubt it). Just to make sure first you clear the contents of var/cache.
If that does not work, and probably won't here is how the indexes work. An index is defined in the config.xml of a module. Here is an example.

<index>
   <indexer>
        <catalog_product_attribute>
            <model>catalog/product_indexer_eav</model>
        </catalog_product_attribute> 
         ..............
    </indexer>
</index>

This declares an index with code catalog_product_attribute. As you can see there is a model tag inside it. That is the model that should handle the index. This is what is missing for one of your indexes.
To see which one is wrong do this:

In the method Mage_Index_Model_Process::getIndexer(), above the line:

Mage::throwException(Mage::helper('index')->__('Indexer model is not defined.')); 

Add this debug line:

echo $code;exit;

and try to access the index grid again. This should show you the index with problems. Check the config.xml files for a tag with the same name as the value you get from the code above. Look specially in the extensions that you recently installed.

2
  • Once echoing $code, check the index_process table for stale indices that are no longer used. Removing an index from a module we previously uninstalled solved my problem. – ScottYoumans Mar 6 '20 at 18:38
  • Same here, disabling the "Mage_Tag" extension lead to its index being no longer available on one of our environments. – Louis B. Oct 16 '20 at 6:44
-2

just remove the all lock files under var\locks\* Most probably it should work. Still if the issue is continue, bellow blogs can help you..

http://techbandhu.wordpress.com/2013/04/20/magento-indexes-issue-status-stay-processing/

http://techbandhu.wordpress.com/2013/04/20/magento-reindexing-problem/

1
  • This did work for me. It shouldn't be downvoted. Damn it, StackOverflow... – WackGet Mar 14 '18 at 15:18
-3

Delete everything in var/ folder. Refresh the cache...

It would work :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.