I'm finding that some AJAX requests in the Rules UI break whenever jQuery Update is set to serve a different jQ version for admin pages than the default. It doesn't seem to matter which jQuery version is used, only that the "alternate" jQuery version for admin pages is set differently from the default. Changing the jQuery Update settings will fix the problem, but it creates a situation where I have to change the settings every time I switch between working with Rules and Views.
The specific place where I've noticed the problem is when I try to add a Rules action to set a data value; the AJAX request fails silently instead of pulling up the usual form for choosing the data value. This is in Rules 7.x-2.3, but I'm presuming that if this problem can occur with one module it could also occur in others.
Comments
Comment #1
ericduran commentedI just fixed #1954930: Loads the frontend version on ajax calls on backend pages
I think this should solve that issue.
Comment #2
eclecto commentedUnfortunately, no. This is as much as I can garner by examining things in Firebug.
The exact error I'm getting is
TypeError: $(...).once is not a function.It seems that the AJAX call in Rules (in this case, making a selection from the "add action" dropdown list) is pulling in the frontend version of jQuery in spite of everything, because the loaded jQuery UI version changes from 1.8.7 to 1.10.2 after the AJAX call and, as the error implies, jQuery.fn.once() disappears. So the frontend version of jQuery is overwriting the backend version in memory, the .once() plugin isn't being reattached, and something else is making a call to $().once() that is failing, and everything goes downhill from there.
Thus also, I guess, the reason why using identical jQuery versions doesn't call the issue, because jQuery isn't being overwritten.
So somehow, I'm guessing, Rules is pulling in something that JQU doesn't recognize as an admin page or that otherwise bypasses JQU's "alternate version" logic.
Comment #3
deggertsen commentedIs this issue at all related?
#1810656: Rules UI does not work with JQuery 1.7+
Comment #4
mradamjohn commented@deggertsen ... I think it is, and an ongoing issue that has appeared across multiple module issue queues (views, rules, fancybox to name a few)
@eclecto has done the best job of summarizing the issue as I've seen it across multiple sites.
This is one such queue as @deggertsen noted already in #3, that I've been watching lately where the ongoing nature of this problem appears to have caused some confusion. (if not on others part, then certainly on mine)
Wondering if anyone is making progress resolving the problem or gathering more information than @eclecto did in #2...
Comment #5
ndf commentedIt is related to ajax-callbacks (RulesUI, ViewsUI). But I believe it is fixed:
https://www.drupal.org/node/2235771#comment-9298411
Comment #6
ofry commentedIt's task, maybe even feature request, but it isn't bug report (because bugs present in bunch of another modules, not JQuery Update).
Comment #7
markhalliwellThe 7.x-3.x branch removed the concept of the "admin jQuery version/paths" and replaced it with #1969244: Specify jQuery version per theme.
This sounds like a jQuery version/API deprecation issue and can resolved in the 7.x-3.x branch by either: