Lesti::Fpc and Layered Navigation

Lesti::Fpc is a great free Full Page Cache plugin for Magento. Though, it could be that it doesn’t work with Layered Navigation.

Solution

1. Go to your site and layered navigation and hover with your mouse on a filter item. It shows the url parameters (like ?color=red&manufacturer=brand).

2. Those parameter you need to add in the admin > config > system > Lesti::FPC > URL params. There add all the possible parameters from above. Like:

price,
cat,
manufacturer,
no_cache,
color

 



Module error message: MediabrowserUtility is not defined

If you install a custom module in Magento it could lack the TinyMce Mediabrowser. You get the following message then:

error: error in [unknown object].fireEvent():

event name: open_browser_callback

error message: MediabrowserUtility is not defined

How to fix this?

Quick fix

In /app/design/adminhtml/default/default/layout/YOURMODULE.xml add:

<reference name="head">
            <action method="setCanLoadExtJs"><flag>1</flag></action>
            <action method="addJs"><script>mage/adminhtml/variables.js</script></action>
            <action method="addJs"><script>mage/adminhtml/wysiwyg/widget.js</script></action>
            <action method="addJs"><script>lib/flex.js</script></action>
            <action method="addJs"><script>lib/FABridge.js</script></action>
            <action method="addJs"><script>mage/adminhtml/flexuploader.js</script></action>
            <action method="addJs"><script>mage/adminhtml/browser.js</script></action>
            <action method="addJs"><script>prototype/window.js</script></action>
            <action method="addItem"><type>js_css</type><name>prototype/windows/themes/default.css</name></action>
            <action method="addItem"><type>js_css</type><name>prototype/windows/themes/magento.css</name></action>
            <action method="addCss"><stylesheet>lib/prototype/windows/themes/magento.css</stylesheet></action>
            
        </reference>

Or change to

Long solution (may not work)

In your /YOURMODULE/etc/config.xml you have:

 
  &lt;cms_wysiwyg_config_prepare&gt;

      &lt;variable_observer&gt;
        core/variable_observer
        prepareWysiwygPluginConfig

In Block/Adminhtml/YOURMODULE/Edit.php

protected function _prepareLayout() {
    parent::_prepareLayout();
    if (Mage::getSingleton('cms/wysiwyg_config')-&gt;isEnabled()) {
        $this-&gt;getLayout()-&gt;getBlock('head')-&gt;setCanLoadTinyMce(true);
        $this-&gt;getLayout()-&gt;getBlock('head')-&gt;setCanLoadExtJs(true);
    }
}

Then in the top of Block/Adminhtml/YOURMODULE/Edit/Tab/Form.php

 protected function _prepareForm() {
            $form = new Varien_Data_Form();
            $this-&gt;setForm($form);
            $wysiwygConfig = Mage::getSingleton('cms/wysiwyg_config')-&gt;getConfig(array('add_variables' =&gt; false,
         'add_widgets' =&gt; false,
          'add_images' =&gt; true,
          'files_browser_window_url' =&gt; Mage::getSingleton('adminhtml/url')-&gt;getUrl('adminhtml/cms_wysiwyg_images/index'),
          'files_browser_window_width' =&gt; (int) Mage::getConfig()-&gt;getNode('adminhtml/cms/browser/window_width'),
          'files_browser_window_height'=&gt; (int) Mage::getConfig()-&gt;getNode('adminhtml/cms/browser/window_height')
         ));

Further down:

$fieldset-&gt;addField('not-called-content', 'editor', array(
                                    'name'      =&gt; 'not-called-content',
                                    'label'     =&gt; Mage::helper('WHATEVER')-&gt;__('Content'),
                                    'title'     =&gt; Mage::helper('WHATEVER')-&gt;__('Content'),
                                    'style'     =&gt; 'width:550px; height:300px;',
                                    'required'  =&gt; false,
                                    'config'    =&gt; $wysiwygConfig,
                                    'wysiwyg'   =&gt; true
                                    ));

With thanks to Theodores