Disable Mootools in Joomla 3.1.1

1,327 views
Skip to first unread message

Viktor Iwan

unread,
Apr 28, 2013, 12:26:46 AM4/28/13
to joomla-de...@googlegroups.com
Hello, i did a clean install on joomla 3.1.1, but i found out it still using mootools...
how to disable mootools completely ?

Thanks

piotr_cz

unread,
Apr 28, 2013, 9:11:44 AM4/28/13
to Joomla! General Development
MooTools is being loaded as a dependency only when it's required (form
validation for example).

So if you manage to disable (to not load) it, requiring script will
break.

There's GSOC 2013 project to refactor scripts using MooTools to jQuery
(http://docs.joomla.org/
GSOC_2013_Project_Ideas#Project:_Convert_JavaScript_from_MooTools_to_jQuery)
but as it says, it will be done after the summer.

At the moment Joomla is checking on scripts in /templates/[template]/
js/ folder before loading from media/system/js/ so you could put
jQuery alternatives of MooTools scripts in there but these should have
similar API and behavior.

For example: rewrite validate.js script to jQuery and save it in /
temnplates/[template]/js/validate.js

I'm actually doing the opposite for Bootstrap plugins :)

Viktor Iwan

unread,
Apr 28, 2013, 11:09:29 AM4/28/13
to joomla-de...@googlegroups.com
I see... Is that mean current Joomla 3.1.1 still require mootools for most of front-end functionality ?

piotr_cz

unread,
Apr 29, 2013, 4:15:05 AM4/29/13
to Joomla! General Development
I think it's because most of default layouts load
JHtml::_('behavior.caption'); and this one requires MooTools.

Try using template override (html/com_content/article/default.php)
without that JHtml code (however captions under images won't show).


Ironically in caption.js there's only 1 line utilizing MooTools
(elements selector), rest of code is all vanilla javascript.


ps:
There's PR with adjusted caption.js to jQ: https://github.com/joomla/joomla-cms/pull/1035


On Apr 28, 5:09 pm, Viktor Iwan <vic...@doxadigital.com> wrote:
> I see... Is that mean current Joomla 3.1.1 still require mootools for most
> of front-end functionality ?
>
>
>
>
>
>
>
> On Sunday, April 28, 2013 8:11:44 PM UTC+7, piotr_cz wrote:
> > MooTools is being loaded as a dependency only when it's required (form
> > validation for example).
>
> > So if you manage to disable (to not load) it, requiring script will
> > break.
>
> > There's GSOC 2013 project to refactor scripts using MooTools to jQuery
> > (http://docs.joomla.org/
> > GSOC_2013_Project_Ideas#Project:_Convert_JavaScript_from_MooTools_to_jQuery <http://docs.joomla.org/GSOC_2013_Project_Ideas#Project:_Convert_JavaS...>)
Reply all
Reply to author
Forward
0 new messages