( ! ) SCREAM: Error suppression ignored for
( ! ) Fatal error: Call to a member function toHtml() on a non-object in C:\wamp\www\app\code\core\Mage\Core\Model\Layout.php on line 555
安装了 Magento 1.7 和 WAMP 2.2 以及自定义模板。 Magento 管理工作完美,但前端给出了上述错误。
magento 1.7 安装中的 Page.xml 和自定义模板根本没有以下代码,因此,没有尝试以下修复:
<block type="core/profiler" output="toHtml"/>
会变成:
<block type="core/profiler" output="toHtml" name="core_profiler"/>
最佳答案
更改后:
<block type="core/profiler" output="toHtml"/>
至
<block type="core/profiler" output="toHtml" name="core_profiler"/>
在 app/design/frontend/base/default/layout 下的 page.xml(或您的自定义 page.xml) 任何一个: 刷新来自管理员的布局构建指令中的缓存或 删除 /var/cache 文件夹的内容,该文件夹位于 magento 文件夹的根目录
关于magento - fatal error : Call to a member function toHtml() on a non-object after installing custom template,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12684532/