10

I need to upgrade a Joomla 2.5 site to 3.x

The site uses a plugin "disable Mootools"

from this developer union-d.ru/

Is anyone using this plugin successfully on 3.3 or know of an plugin with similar functionality for 3.3? Thanks- the developer is not answering my questions...

Is anyone using this plugin on a 3.x site with success? Or know of another, similar plugin that works on 3.x? Thanks!

4 Answers 4

6

This tool will disable Mootools if necessary, and is compatible with Joomla 3: http://extensions.joomla.org/extensions/core-enhancements/performance/mootools/22236

In Joomla 3.0, MooTools has been deprecated, and jQuery is the default javascript framework. In order to add MooTools Core libraries you need to add:

JHTML::_('behavior.framework');

Thus it depends on your template/extensions if Mootools is loaded or not.

In the Google Chrome developer console (and probably in Firefox's Firebug), you can check if MooTools is enabled with this little javascript code:

window.MooTools ? alert ("MooTools loaded") : alert("MooTools NOT loaded");
1
  • Some years passed but the answer is still valid and works for Joomla 3.8.*
    – BastianW
    Oct 18, 2017 at 13:09
2

This plugin is specifically for Joomla 2.5, therefore there may be some deprecated code when using it on Joomla 3.x. I would personally recommend using jQuery Easy which is a highly reputable plugin. It's main feature is importing jQuery on your site and ensuring that it is only ever loaded once and at the top of the scripts list, but it also has a feature to disable MooTools where possible.

1

Plug-in for managements of built-in libraries Joomla. Main options: Mootools disable, Jquery disable, Bootstrap disable https://github.com/vlasenkofedor/joomla_options

1
  • This is definitely the best solution. Im using it with joomla 3.6. God bless you! Thank you so much! This plugin is awesome.
    – public9nf
    Oct 9, 2016 at 19:16
0

If you are developing a plugin and onAfterRender event is NOT working, try using the event onBeforeCompileHead as shown below.

public function onBeforeCompileHead() {
    if ($this->app instanceof JApplicationSite) {
        $doc = JFactory::getDocument();
        $search     = array(
            'jui/js/bootstrap.min.js',
            'mootools-core.js',
            'mootools-more.js',
        );
        foreach ($doc->_scripts as $key => $script) {
            foreach ($search as $findme) {
                if (stristr($key, $findme) !== false) {
                    unset($doc->_scripts[$key]);
                }
            }
        }
    }
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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