2

在 magento 升级期间,当我尝试重新索引所有:

php shell/indexer.php --reindexall

我收到以下错误:

PHP 致命错误:在第 58 行的 /shell/indexer.php 中的非对象上调用成员函数 getProcessesCollection()

4

2 回答 2

3

也许这对一年后找到这张票的人有帮助。

我手头有同样的情况,但建议在升级后清除缓存,然后再运行任何功能。

在运行之前,php shell/indexer.php --reindexall我得到了相同的结果;

PHP 致命错误:在布尔等值上调用成员函数 getProcessesCollection()。

但是跑完之后rm -rf downloader/.cache/ var/cache/

php shell/indexer.php --reindexall命令再次开始工作。

于 2016-05-27T07:56:14.647 回答
1

很可能缺少这个类文件:Mage_Index_Model_Indexer(在 app/code/core/Mage/Index/Model/Indexer.php 中)。

在 shell/indexer.php 的第 58 行:

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

_getIndexer() 返回在 Index 模块配置中声明的模型:

<config>
    <modules>
        <Mage_Index>
            <version>1.6.0.0</version>
        </Mage_Index>
    </modules>
    <global>
        ...        
        <index>
            <index_model>index/indexer</index_model>
        </index>
        ...
于 2015-05-02T03:54:15.637 回答