Failure

User tests: Successful: Unsuccessful:

avatar Chris-Jones-Gill
Chris-Jones-Gill
16 Jan 2013

See tracker item 29963
http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_id=8549&tracker_item_id=29963

Details

Currently behaviour.php will autoload mootools framework if any session
management uses keepalive - such as adding the login module to a site or if a
user edits an article in the front end.

Some templates remove mootools before rendering, so when this keepalive script
is added - unless the template checks and removes it - the added script causes
an error because mootools isn't present, and Keepalive uses the window.addevent
mootools function.

Adding a session framework option in the admin that allows admin to choose
between mootools and jQuery means that this front-end error can be avoided for
templates that don't want to use mootools.

Because behaviour.php is a core library it cannot be overridden by the
template, so they either have to accept mootools being added, accept the error,
or write some code to strip out the added code before the page is rendered - 2
of these options mean that the keepalive behavior doesn't work.

avatar KISS-Web-Design KISS-Web-Design - open - 16 Jan 2013
avatar okonomiyaki3000
okonomiyaki3000 - comment - 30 Apr 2013

These changes don't properly address the issue. This is MooTools code which is being used in both the MT and JQ versions:

var myAjax = new Request({method: "get", url: "index.php"}).send();

It needs to be replaced with a JQuery equivalent. Furthermore, setInterval is plain JS and can be used for both. Considering this, you can probably find a way to write this that's a little more DRY.

Anyway, this is not the only function in Joomla that relies on MooTools. If Joomla is going to really support multiple js libraries, it should do it in a more complete way. Although I strongly prefer MT over JQ, I kind of feel that it's a lost cause at this point and maybe it's better to just switch to JQ completely.

avatar Bakual
Bakual - comment - 3 Mar 2014

The solution will be to remove MooTools from core, which is a goal for 3.3 :smile:

Closing this one.

avatar Bakual Bakual - close - 3 Mar 2014

Add a Comment

Login with GitHub to post a comment