Solving “Call to a member function toHtml()” Magento Error

Solving “Call to a member function toHtml()” Magento Error

One of the errors you’ll usually encounter when you use a theme made for Magento 1.3 on Magento 1.4.1 0 is the “call to a member function toHtml()”. There’s a very easy fix for this error.

The error usually looks like this -

Fatal error: Call to a member function toHtml() on a non-object in \app\code\core\Mage\Core\Model\Layout.php on line 529

Navigate to
\app\design\frontend\default\themename\layout\page.xml

Find

<block type="core/profiler" output="toHtml"/>

Replace with

<block type="core/profiler" output="toHtml" name="core_profiler"/>

That’s it. The error should go away, and you should be back looking at the frontend of your Magento Store.

Leave a Reply

WP SlimStat