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

If you get a Error like
"Fatal error: Call to a member function toHtml() on a non-object" which depends on the line: app/code/core/Mage/Core/Model/Layout.php on line 529 of a 1.4.X Magento version you have to search after this lines in your page.xml:

search this line:

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

and change it so this:

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

Keep in mind that your page.xml can be stored under:

  • app/design/frontend/base/default/layout (thats the default one which should be updated my magento himself)
  • app/design/frontend/default/default/layout/page.xml
  • or if you made your own themen / installed a theme which is not any more compatible

  • app/design/frontend/THEMEDIR/THEMENAME/layout/page.xml
  • Clearly the most important is the active theme.