2

During magento upgrade, when I tried to reindex all:

php shell/indexer.php --reindexall

I got following error:

PHP Fatal error: Call to a member function getProcessesCollection() on a non-object in /shell/indexer.php on line 58

dario
  • 5,149
  • 12
  • 28
  • 32
lvekua
  • 196
  • 5
  • 17

2 Answers2

3

Maybe this can be of help to anyone finding this ticket a year after.

I had the same situation at hand, but after upgrading it is advised to clear the cache before running any function at all.

Before running php shell/indexer.php --reindexall i got the same result;

PHP Fatal error: Call to a member function getProcessesCollection() on boolean etc.

But after running rm -rf downloader/.cache/ var/cache/

The php shell/indexer.php --reindexall command started working again.

1

Most probably this class file is missing: Mage_Index_Model_Indexer (in app/code/core/Mage/Index/Model/Indexer.php).

On line 58 of shell/indexer.php:

$collection = $this->_getIndexer()->getProcessesCollection();

_getIndexer() returns the model as declared in the Index module configuration:

<config>
    <modules>
        <Mage_Index>
            <version>1.6.0.0</version>
        </Mage_Index>
    </modules>
    <global>
        ...        
        <index>
            <index_model>index/indexer</index_model>
        </index>
        ...
  • I have the same problem. The `global/index/index_model` parameter is passed to `$this->_config->getNode()` in `Mage_Core_Model_Factory`, but that call returns false. The config.xml exists and contains the text above. Very confusing! The code works on my local dev box, but not on a live server. – Dave Child Jun 23 '15 at 19:39