Magento致命错误:在非对象上调用成员函数getSortedChildren()

afo*_*kur 6 magento magento-1.9

我已经安装了Magento CE 1.9版本,并在主页上调用Catalog后收到错误.问题似乎与list.phtml有关.

错误:致命错误:在第74行的mageinc\app\design\frontend\rwd\default\template\catalog\product\list.phtml中的非对象上调用成员函数getSortedChildren()

安装后我没有改变任何东西,看来这个问题来自Magento 1.9版本.

在为两个视图调用时,"目录"页面上的"列表"和"网格"视图都会出现问题.

有没有最好的解决方案来解决这个问题?

小智 5

你只需要删除第->getSortedChildren();134行的方法

$_nameAfterChildren = $this->getChild('name.after')->getSortedChildren();
Run Code Online (Sandbox Code Playgroud)

所以你有了

$_nameAfterChildren = $this->getChild('name.after');
Run Code Online (Sandbox Code Playgroud)