In backend: If I click on "insert widget" on both, with WYSIWYG editor and without, I only get a blank "widget"-popup. If I enable display errors I see:

Fatal error: Call to a member function setCanLoadTinyMce() on a non-object in /www/sites/dev.example.com/files/html/app/code/core/Mage/Adminhtml/Block/Widget/Form/Container.php on line 85 
Fatal error: Undefined class constant 'STRAIGHT_JOIN' in /www/sites/dev.example.com/files/html/lib/Varien/Db/Select.php on line 69 
Fatal error: Class 'Mage' not found in /www/sites/dev.example.com/files/html/app/code/core/Mage/Core/Model/Resource/Session.php on line 108

If I'm gonna comment out line #85 in Container.php the error seems to be gone and the widgets show up.

// Line #84-87 in Container.php
if (Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) { 
    $this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);  // #85

Of course that is a very bad solution. Can anyone point me in the right direction what is probably causing the issue? I couldn't find anything or solve the issue without uncomment this line. Thank you so much.

Magento Multistore setup


Seems Magento is not able to find your head block from Container.php file.

Try calling it like this: Mage::app()->getLayout()->getBlock('head')->setCanLoadTinyMce(true);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.