error message: MediabrowserUtility is not defined

If you are experiencing the following error when trying to add an image via the Magento WYSIWYG editor, You can easily fix this by modifying your Form.php code of which contains the WYSIWYG field.

Magento Open Browser Callback Javascript Error

The error is due to a missing configuration setting which is assigned to the WYSWIG addField() array.

If you open your Form.php simply add the following above the WYSIWYG field,

Then modify your WYSIWYG form field (see highlighted below),

Good luck!

  • Lyle

    Can you please tell us what path is form.php in please?


    • verheesj


      Is this happening on a custom module or a Magento core module?

      Kind Regards,

      J. Verhees

  • Guest


    Please can you state what path form.php is in?


  • Lyle

    Just the core. I am trying to inject an image in the transactional emails editor

    • verheesj

      I will do an article on this because I have been asked several times about adding in a WYSIWYG editor. I will of course email you once I have done this.

      In the mean time, you can edit the following file,


      The addField() function you are looking for named ‘template_text’

      Let me know if you need any more help.

  • StefanMaier

    ok it works – BUT – the user cant insert images via File-Uploader anymore – so this is not a real solution – any ideas?

  • StefanMaier

    Answer to myself:

    $configSettings = Mage::getSingleton(‘cms/wysiwyg_config’)->getConfig();
    $configSettings['files_browser_window_url'] = $this->getBaseUrl().’admin/cms_wysiwyg_images/index/’;

    instead of

    $configSettings = array( ‘add_widgets’ => false, ‘add_variables’ => false, ‘add_images’ => false, ‘files_browser_window_url’=> $this->getBaseUrl().’admin/cms_wysiwyg_images/index/’));

  • Imran Anawr

    Where i can find Form.php to solbe this issue