If I go to module JQuery Update settings and set JQuery for site to 1.7, and next try to add an Action of any type and choose one from the select list the wheel spins for a bit then nothings happens. Trying a second time to choose from the select list does not produce the spinning wheel.

If I turn off jQuery Update or set JQuery version for administrative pages to 1.5 or default (it possible with dev version of JQuery) all working normal.

But exist many modules which doesn't working at all without JQuery 1.7 at least. Sample is fancybox https://www.drupal.org/project/fancybox

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sylus’s picture

Can confirm the same problem is this to with the .attr() problem with newer versions of jquery?

bonobo’s picture

Version: 7.x-2.2 » 7.x-2.3

I can confirm that this is also an issue with the 2.3 branch of Rules.

However, unlike the jQuery Update conflicts that occurred with both the Features UI and the Views UI (which could be mitigated by selecting a different version of jQuery), the Rules UI is broken with jQuery version 1.5, 1.7, and 1.8, which makes this module pretty unusable in a site running the jQuery Update module.

Despite what is reported in #1792524: code error which causes adding new condition to not do anything when user clicks on "Continue" green button this does not appear to be affected by UUID.

To recreate the issue, install Rules and jQuery Update.

Then, attempt to add any event, condition, or action that requires any of the data selectors. The data selectors do not work.

OnkelTem’s picture

Priority: Normal » Major

Any solutions?

bonobo’s picture

Our solution was to not use Rules.

OnkelTem’s picture

Bump

ptmkenny’s picture

Marked http://drupal.org/node/1946162 as duplicate of this issue

deggertsen’s picture

No progress on this? I've attached a screenshot just for fun...

Does anybody have any idea where to start? I might try to fix this. I have to have both rules and jquery update so yeah...

Mark Trapp’s picture

For those wanting to roll back, jQuery Update commit baff5d1 is the last one that works with Rules. Data selectors, but not the initial drop-down menu for actions, works with jQuery Update commit 469fac0.

deggertsen’s picture

Here's what I'm getting in the console output in Chrome:

Uncaught TypeError: Object [object Object] has no method 'menu'
$.widget._create
(anonymous function)
$.Widget._createWidget
$.(anonymous function).(anonymous function)
(anonymous function)
jQuery.extend.each
jQuery.fn.jQuery.each
$.fn.(anonymous function)
Drupal.rules.autocomplete
(anonymous function)
jQuery.extend.each
jQuery.fn.jQuery.each
$.fn.once
Drupal.behaviors.rules_autocomplete.attach
(anonymous function)
jQuery.extend.each
Drupal.attachBehaviors
Drupal.ajax.commands.insert
Drupal.ajax.success
ajax.options.success
options.success
fire
self.fireWith
done
callback

And here's what I get in Firefox:

TypeError: $(...).addClass(...).appendTo(...).menu is not a function
if ( length > 1 ) {
  for ( ; i < length; i++ ) {
    if ( args[ i ] && args[ i ].promise && jQuery.isFunction( args[ i ].promise ) ) {
      args[ i ].promise().then( resolveFunc(i), deferred.reject, progressFunc(i) );
    } else {
      --count;
    }
  }
  if ( !count ) {
    deferred.resolveWith( deferred, args );
  }
}

TypeError: this.menu is undefined
_close: function( event ) {
  if ( this.menu.element.is( ":visible" ) ) {
    this.menu.element.hide();
    this.menu.blur();
    this.isNewMenu = true;
    this._trigger( "close", event );
  }
}

Does this help anyone? I don't understand javascript and jquery very well so it's Greek to me.

fago’s picture

pjcdawkins’s picture

Status: Active » Needs work
FileSize
1.04 KB

I've marked the above mentioned issue (#1410978) as a duplicate of this one.

We could do with more debugging.

jQuery 1.8 is working OK with Rules for me, AFAICS, needing just a couple of tweaks for supporting jQuery UI >=1.10.

Here's the last patch I posted in that thread. It only applies for those running jQuery UI >=1.10. I suppose what we should do is make this patch work with or without, so it's backward/forward compatible.

See http://jqueryui.com/upgrade-guide/1.10/

pjcdawkins’s picture

Version: 7.x-2.3 » 7.x-2.x-dev
Component: Module Integrations » User Interface

Patches are against -dev of course.

Punk_UnDeaD’s picture

ajax detect jquery version right, but not correct jquery ui version

must be like this

function jquery_update_library_alter(&$javascript, $module) {
//...
//...
  if (!empty($admin_version) && path_is_admin(current_path())) {
    if (version_compare($version, $admin_version, '!=')) {
      $version = $admin_version;
    }
  }

  // If the ajax version is set then that one always win.
  if (!empty($_POST['ajax_page_state']['jquery_version'])) {
    $ajax_version = $_POST['ajax_page_state']['jquery_version'];
    if (in_array($ajax_version, array('1.5', '1.6', '1.7'))) {
      $version = $ajax_version;
    }
  }
//...
//...

please, test it
http://yadi.sk/d/j7Fjkm4O6Ubix

mattsmith3’s picture

@ Punk_UnDeaD
I was thinking of a similar approach, but with an entry to the variables table.
Check out what jquery_update does now:

+------------------------------------+---------------+
| name                               | value         |
+------------------------------------+---------------+
| jquery_update_compression_type     | s:3:"min";    |
| jquery_update_jquery_admin_version | s:3:"1.7";    |
| jquery_update_jquery_cdn           | s:6:"google"; |
| jquery_update_jquery_version       | s:3:"1.5";    |
+------------------------------------+---------------+

... seems to me that all that is missing is jquery_update_jquery_ui_version
Modules could then do a simple variable_get and an if statement to check for compatibility.

mattsmith3’s picture

Bringing to the jquery_update queue.
https://drupal.org/node/2034987

fubhy’s picture

+++ b/ui/rules.autocomplete.jsundefined
@@ -105,12 +105,12 @@ Drupal.rules = Drupal.rules || {};
-    this.jqObject.data("autocomplete").close = function (event) {
+    this.jqObject.data("ui-autocomplete").close = function (event) {

Do the older jQuery versions already write into date-ui-autocomplete? Because if they don't, then these changes break backwards compatibility.

pjcdawkins’s picture

Status: Needs work » Needs review
FileSize
1.19 KB

@fubhy, I don't think so, but that could be solved by something like this

fubhy’s picture

Yep, that looks better.

fago’s picture

Thanks - #17 looks good, any testers?

Mark Trapp’s picture

Status: Needs review » Needs work

Seems to only work when the admin jQuery is set to 1.5, 1.7, or "use the default" and when the default jQuery is set to 1.5 (which would unfortunately defeat the purpose of using jQuery Update).

With jQuery Update latest head, Rules latest head, and the patch in #17 applied:

Admin set to 1.8

  • Default: 1.8: add action drop-down works; data selector has button on right side, but doesn't autocomplete and clicking the button has no effect.
  • Default: 1.5, 1.7: add action drop-down doesn't work: If you select an action, the Ajax load indicator appears, but disappears without any change to the form after a a few seconds; data selector has button on right side, but doesn't autocomplete and clicking the button has no effect.

Admin set to 1.7

  • Default: 1.7, 1.8: add action drop-down works; data selector has button on right side, but doesn't autocomplete and clicking the button has no effect.
  • Default: 1.5 add action drop-down works; data selector works

Admin set to 1.5

  • Default: 1.7, 1.8: add action drop-down works; data selector renders as plain text field: no button, no autocomplete
  • Default: 1.5 add action drop-down works; data selector works

Admin set to "use default"

  • Default: 1.7, 1.8: add action drop-down works; data selector has button on right side, but doesn't autocomplete and clicking the button has no effect.
  • Default: 1.5 add action drop-down works; data selector works
pjcdawkins’s picture

Currently on the move so can't test but that surprises me as it works for me on a site with 1.8. Any JS console errors you can paste?

deggertsen’s picture

Applied the patch with the following results.

Default is set to 1.7 for everything below

Admin use default: Same results as #20

Admin 1.5: Everything works as expected so far! Thank you!

Admin 1.7: Same results as #20

Admin 1.8: Same results as #20

deggertsen’s picture

This is what shows up in the console when I have admin set to 1.8:

Uncaught TypeError: Object [object Object] has no method 'menu'
$.widget._create
(anonymous function)
$.Widget._createWidget
$.(anonymous function).(anonymous function)
(anonymous function)
jQuery.extend.each
jQuery.fn.jQuery.each
$.fn.(anonymous function)
Drupal.rules.autocomplete
(anonymous function)
jQuery.extend.each
jQuery.fn.jQuery.each
$.fn.once
Drupal.behaviors.rules_autocomplete.attach
(anonymous function)
jQuery.extend.each
Drupal.attachBehaviors
Drupal.theme.placeholder
fire
self.fireWith
jQuery.extend.ready
DOMContentLoaded
Mark Trapp’s picture

Error when data selector has button, but doesn't autocomplete (Admin 1.8/Default All; Admin 1.7, Use default/Default 1.7, 1.8):

[Error] TypeError: 'undefined' is not a function (evaluating '$( "<ul>" ) (undefined, line 201)
			.addClass( "ui-autocomplete ui-front" )
			.appendTo( this._appendTo() )
			.menu')

Error when add action drop-down menu doesn't work (Admin 1.8/Default 1.5, 1.7):

[Error] TypeError: 'undefined' is not a function (evaluating '$('form.user-info-from-cookie').once') (undefined, line 65)

Error when data selector doesn't render (Admin 1.5/Default 1.7, 1.8):

[Error] TypeError: 'undefined' is not a function (evaluating 'this.element.prop( "disabled" )') (action, line 63)

pjcdawkins’s picture

Status: Needs work » Needs review
FileSize
2.56 KB

Thanks. I've made some changes. Seems to have UI issues (the new jQuery UI Menu component has weird gaps between options, and keyboard access seems a bit broken), but I haven't had console errors which is an improvement.

Mark Trapp’s picture

Status: Needs review » Needs work

Awesome, it's getting there. Here are my results from the patch in #25:

Admin set to 1.8

  • Default: 1.8: add action drop-down works; data selector works but has the funky padding issue.
  • Default: 1.5, 1.7: no change: drop-down menu doesn't work, data selector renders but no autocomplete. Same errors as before.

Admin set to 1.7

  • Default: 1.7, 1.8: add action drop-down works; data selector works but has the funky padding issue.
  • Default: 1.5 no change: add action drop-down works; data selector works without any padding issue.

Admin set to 1.5

  • Default: 1.7, 1.8: no change: add action drop-down works; data selector renders as plain text field: no button, no autocomplete. Same errors as before.
  • Default: 1.5 no change: add action drop-down works; data selector works without any padding issue.

Admin set to "use default"

  • Default: 1.7, 1.8: add action drop-down works; data selector works but has the funky padding issue.
  • Default: 1.5 no change: add action drop-down works; data selector works without any padding issue.
OnkelTem’s picture

I confirm #26 report about 1.8 - data selectors have jumping paddings. Patch from #25.

mortenlinkfactory’s picture

It doesn't work for me with the versions described in #20:
jQuery Update latest head, Rules latest head, and the patch in #17 applied. I've tried with all versions of jQuery.

Chrome still reports Uncaught TypeError: Cannot set property '_renderItem' of undefined

I've also uninstalled Search Autocomplete, and it still doesn't work.

mortenlinkfactory’s picture

Status: Needs work » Fixed

I found a solution for the problem I encountered, which is not exactly the same as the problems encountered in this thread.

I'm adding it here in case other people have this problem and can't find a proper solution. It can be quite difficult to find the core to the problem, when the error message is the exact same.

My problem is related to apachesolr_autocomplete, and there is a fix here: https://drupal.org/node/1491068

WorldFallz’s picture

Status: Fixed » Needs work

which is not exactly the same as the problems encountered in this thread.

The why on earth would you say this issue is "fixed"? Reverting status.....

aukhan’s picture

Confirming #29

Yes We are having the same issue and our conflict is also due to the apachesolr_autocomplete module ... this modules extends the jQuery autocomplete function which in turn conflicts with rules autocomplete functionality
the patch mentioned here https://drupal.org/node/1491068 fixes the issue for us ....

Anonymous’s picture

I get a completely different error when I try to select "Select the condition to add: Node is of type":
Uncaught TypeError: Cannot read property 'length' of undefined
Patch #25 doesn't solve that problem.
Using jQuery 1.5 for the admin.
Disabling jQuery Update solves the problem. Seems Rules and jQuery just don't work together.

TBarina’s picture

I'm using:

  • Drupal: 7.23
  • Rules: latest 7.x-2.5+0-dev (3 oct) with patch #25 applied
  • jQuery Update: latest 7.x-2.3+7-dev
  • jQuery 1.8.2 and jQuery UI 1.10.2

With jQuery Update set to using CDN (google or microsoft):
Data selector works showing available items. Also autocomplete works.
The only problem is that I cannot make a selection from the items displayed in the combo box because as soon as I mouse the mouse or press an arrow key the popup combo closes.

With jQuery Update set to using CDN (jQuery): autocomplete doesn't work and no combo popup appears.

If I switch back to CDN = none: everything works fine again!

byue’s picture

tried #23 and got the following error on chrome:

Uncaught TypeError: Object [object Object] has no method 'menu'
e.widget._create
(anonymous function)
e.Widget._createWidget
e.(anonymous function).(anonymous function)
(anonymous function)
p.extend.each jquery.min.js?v=1.8.2:2
p.fn.p.each jquery.min.js?v=1.8.2:2
e.fn.(anonymous function)
Drupal.rules.autocomplete
(anonymous function)
p.extend.each jquery.min.js?v=1.8.2:2
p.fn.p.each jquery.min.js?v=1.8.2:2
$.fn.once jquery.once.js?v=1.2:55
Drupal.behaviors.rules_autocomplete.attach
(anonymous function) drupal.js?mu5o20:76
p.extend.each jquery.min.js?v=1.8.2:2
Drupal.attachBehaviors drupal.js?mu5o20:74
Drupal.ajax.commands.insert ajax.js?v=7.23:542
Drupal.ajax.success ajax.js?v=7.23:400
ajax.options.success ajax.js?v=7.23:164
c.success jquery.form.min.js?v=2.69:11
k jquery.min.js?v=1.8.2:2
l.fireWith jquery.min.js?v=1.8.2:2
y jquery.min.js?v=1.8.2:2
d jquery.min.js?v=1.8.2:2

byue’s picture

retried #33, works now thank you

ericduran’s picture

#25 looks good but the menu addition shouldn't be done that way. It seems this is being done because of this bug in jquery_update #2086105: jQuery UI menu not including

I'm going to fix that bug now and instead if the rules.autocomplete depends on jquery autocomplete the menu.js should just be included by the dependency system.

Does this make sense?

moonray’s picture

I rerolled the patch in #25 without the "jQuery UI menu not being included" fix; it's fixed in jQuery Update module, as per #36.

It seems #26 requires some additional tweaks to make this work for more use-cases than mine. This patch solved the issue for me, though.

Anonymous’s picture

-edit- my issue was caused by the clientside validation extension. The patch from #37 works.

Anonymous’s picture

Issue summary: View changes
Status: Needs work » Reviewed & tested by the community

Patch #37 works for me

Iztok’s picture

Patch not working on the dev version of jQuery update module.

TBarina’s picture

I still confirm that #37 doesn't work when using CDN.
Is there any way to fix it?

muschpusch’s picture

Status: Reviewed & tested by the community » Needs work

The patch works when using 1.5 of jquery update but breaks when using default. So this needs work...

iLLin’s picture

Patch #37 works for me with version 1.10. In the data selectors it was spitting out the html markup and throwing the Cannot set property '_renderItem' of undefined error and that is now fixed.

dmsmidt’s picture

Patch is not solving anything for me.

TypeError: this.jqObject.data(...) is undefined (line 111)
	this.jqObject.data(autocompleteDataKey)._renderItem = function(ul, item) {

But I get the error even without JQuery update.
Latest Rules dev version
JQuery update 7.x-2.3

joco_sp’s picture

I disabled and deleted the JQuery update, but the problem is still there.

myselfhimself’s picture

Patching Rules module with #37 along with installed jquery_update 7.x-2.3+15-dev (jQuery 1.10) makes Rules Add action form's JS rework!

Thanks!

ifrik’s picture

Using

  • jQuery Update jQuery 1.5.2 and jQuery UI 1.8.7
  • Rules 7-2.6

The drop-down to use a condition works, but the Data selector field does not have autocomplete and the Data Selector list isn't a collapsed list, but just a word.
However after clicking on 'Save' without filling in a value for the data, I get the expected error message - and the autocomplete works and Data selector link is the collapsed table that it should be.

dobe’s picture

#37 patch appears to work for me so far with the latest dev version of jQuery update

himanshupathak3’s picture

Hello,

No need for any patch, if you have installed jquery update select version 1.7 also do not select any cdn (google), for cdn choose none, Problem is resolved. :)

Thanks,
Himanshu

xcel’s picture

Agree to #33 and 49.
Thanks !

But if you need CDN ... maybe you could disable it while u need to edit rules (at least you are not stuck during development)

rei’s picture

confirm patch #37 works with jquery_update 7.x-2.3+15-dev (jquery 1.10) and rules 7.x-2.6

aether’s picture

Yes. #37 works.
rules-7.x-2.6
jquery_update-7.x-2.3+15-dev

Anybody’s picture

Status: Needs work » Needs review

I can NOT confirm #49! I've selected jQuery 1.7 for admin and the normal theme and the error is still there even after clearing caches.

First after applying patch #37 and clearing caches everything worked again.
I think we should move this forward and set it RTBC soon or do further investigations. It's major.

tregismoreira’s picture

I'm using:
- Drupal 7.26
- jQuery Update 7.x-2.3+17-dev
- Rules 2.6

So:
- #37 patch works for me! Thanks a lot!
- #49 doesn't work :/

ginogarcia’s picture

Hi guys, I am pretty new to Drupal and programming in general, so pleas bear with me... I got the data selector working by configuring the jQuery_update module:
Default JQuery Version: 1.7
Alternate JQuery Version: 1.7
JQuery Compression Level: Development (I doubt this should make any differences)
JQuery and JQuery UI CDN : JQuery

Hope this help!
Gino

mouhammed’s picture

The #55 work for me.
I think that its the JQuery UI CDN none value doesn't work.
Thanks for @ginogarcia.

joep.hendrix’s picture

Very strange: #55 works for me too.
Local or via Google cdn does not work.

hockey2112’s picture

#55 worked for me as well. I am using Jquery Update 7.x-2.4. Thanks!

Tritof’s picture

#55 works for me too. Jquery update version = 7.x-2.4.
Thanks very much !

dobe’s picture

Problem with #55 off the top of my head is your Views UI is now probably broken... Among other administrative things. The patch (#37) must be applied to fix the issue. Yes there are many ways of avoiding the issue only to be slapped by another.

GoddamnNoise’s picture

Using:
- Drupal 7.27
- Rules 7.x-2.6
- JQuery Update 7.x-2.4 (Default JQuery Version: 1.8, Alternate JQuery for administrative pages: 1.5, CDN: none)

And applying #37 patch.

Problem still there: add action drop-down works; data selector renders as plain text field: no button, no autocomplete (image attached). Looking at the Chrome javascript console, i got this error:

Uncaught TypeError: Object [object Object] has no method 'prop' VM1896:4
t.widget._create VM1896:4
(anonymous function) VM1890:4
e.Widget._createWidget VM1890:4
e.(anonymous function).(anonymous function) VM1890:4
(anonymous function) VM1890:4
d.extend.each jquery.min.js?v=1.5.2:16
d.fn.d.each jquery.min.js?v=1.5.2:16
e.fn.(anonymous function) VM1890:4
Drupal.rules.autocomplete VM1898:38
(anonymous function) VM1898:12
d.extend.each jquery.min.js?v=1.5.2:16
d.fn.d.each jquery.min.js?v=1.5.2:16
$.fn.once jquery.once.js?v=1.2:55
Drupal.behaviors.rules_autocomplete.attach VM1898:10
(anonymous function) drupal.js?n4u1rn:76
d.extend.each jquery.min.js?v=1.5.2:16
Drupal.attachBehaviors drupal.js?n4u1rn:74
Drupal.ajax.commands.insert ajax.js?v=7.27:542
Drupal.ajax.success ajax.js?v=7.27:400
ajax.options.success ajax.js?v=7.27:164
c.success jquery.form.min.js?v=2.69:11
f.resolveWith jquery.min.js?v=1.5.2:16
v jquery.min.js?v=1.5.2:16
c

Solution suggested in #47 seems to work (leaving the data selector empty and clicking the "Continue" button shows the expected error, but everything begins to work as it should: data selector appears, button works, autocomplete works and so on).

Using the jQuery CDN seems to solve the problem too (but many things stop to work then on my frontend, so i can't do this).

GoddamnNoise’s picture

GoddamnNoise’s picture

ofry’s picture

As temporary solution, you can use different JQuery versions in front-end and back-end of your site (last dev version of jquery_update can help you with it).

GoddamnNoise’s picture

That's what i've done and what i've explained in #61, but it doesn't work even if i use different JQuery versions in front-end and back-end. The only things that have worked for me are those explained in #61.

mctwist’s picture

#55 worked for me. Thanks! The only thing thing that changed from when it was last working (yesterday morning) was upgrading to the newest version of Drupal (yesterday afternoon).

DrCord’s picture

The patch in #37 worked perfect for me. I was getting HTML code in the data selector. I am using jQuery 1.8 via jQuery Update.

xandeadx’s picture

FileSize
6.62 KB

I use last dev jQuery update and use default drupal jQuery version on admin paths. And it's work.

heddn’s picture

Status: Needs review » Fixed

Using this on a commerce kickstart site and bootstrap theme that uses jquery 1.8. Switching to use jquery 1.7 on the admin side fixed the issue. Marking as fixed as this combination seems to resolve the issue for many folks.

GoddamnNoise’s picture

JQuery 1.7 breaks Rules UI as explained in #2

quwat’s picture

I updated the Jquery to the dev version. Rules starting working like a charm.

i.bajrai’s picture

I can confirm #55 is working

greenwork’s picture

I downgraded to 1.5 and everything on commerce kickstarter is working again. I am using the google CDN

markus_petrux’s picture

Status: Fixed » Active

Marking the issue as fixed would need some kind of action. Maybe making rules work with any version of jQuery, documenting the dependency..., which is not a nice solution because it may conflict with other modules.

geek-merlin’s picture

Status: Active » Reviewed & tested by the community

* tested #37 and it worksforme
* based on the about 10 other confirmations setting rtbc, based on considerations:
** #37 is already a huge win
** if there are or will be some jquery versions that break this should be a followup
** problems with CDN (which are also mentioned) are not a needswork for this patch but must be addressed separately, see #982188: Work around Same-Origin Policy: Cross-Origin Resource Sharing (CORS) support

APPENDIX: here are my CDN exclusion settings:
*/rules.autocomplete.js
*/jquery.ui.widget.min.js
*/jquery.ui.button.min.js
*/jquery.ui.core.min.js
*/jquery.ui.menu.min.js
*/jquery.ui.autocomplete.min.js

Also created #2275505: Provide reasonable jquery-ui blacklist

EDIT: #55 is a workaround, NOT a patch.

gintass’s picture

#55 is working. I wish this problem would be mentioned on the main project page. It could save a lot of time to other people.

Anonymous’s picture

Agree #37 works. Thx for this patch

tripper54’s picture

Title: Does not work with jQuery Update 7.x-2.3 » Rules UI does not work with jQuery Update 7.x-2.3
Train’s picture

I would like to mention that when using #55 and behind https://, the jQuery and Microsoft CDNs will not load over https://. Google is fine.

Sorry, jQuery Update 7.x-2.4, Rules 7.x-2.7...

cknoebel’s picture

#55 works for me however my combo of stuff is slightly different:
* Default version: 1.10
* Alternate version: 1.5
* Compression: minified
* CDN: Google

The other CDNs didn't work for me and alternate versions over 1.5 didn't work either. Also, the patch in #37 did not work for me.

lmeurs’s picture

Thanks for #37!

Patch solved my JS error when adding a "Set a data value" action (with Rules 7.x-2.7, jQuery Update 7.x-2.4).

slucero’s picture

#37 fixed the issue perfectly for me too!

* Rules 7.x-2.7
* jQuery Update 7.x-2.4

cdmo’s picture

I found using 1.7 with either no CDN or jQuery worked for me.

jQuery Update 7.x-2.4
Rules 7.x-2.7

joshua.boltz’s picture

Hello,

I first stumbled upon this issue after installing and trying out the bootstrap_tour module.
Depending on the jquery_update settings, that module will not work. It especially conflicts with Menu Block.

So, in order to get the tour module working, I had to set jquery_update to 1.7, but then that broke mini panels and rules ui, because they work best with 1.5.

So, the only way I can get Rules UI data selectors to work is set jquery_update "Default jQuery Version" to 1.7 and "Alternate jQuery version for administrative pages" to 1.5, so tour and other admin-related modules/functionality can still work.

Rules 7.x-2.7
jQuery Update 7.x-2.4
Panels/Mini-Panels 7.x-3.4
Ctools 7.x-1.4
Menu Block 7.x-2.4

I'm sure I'll stumble upon another instance where something doesn't work, so I am interested in any ideas to hopefully get everything working using the same jQuery version.

2pha’s picture

@joshua.boltz : Using the dev version of jquery update now allows you to use the default drupal jquery for admin pages. Give it a go.

hansfn’s picture

Patch #37 works for me - even using jQuery Update with jQuery 1.8. It's the same patch used by other projects. Any reason this wasn't included in Rules 2.7?

joelstein’s picture

Patch #37 works for me!

paean99’s picture

#37 seems to works for me.
Open Atrium 2.21, jQuery Update 2.4, Rules 2.7.
Thanks.

deggertsen’s picture

The day this gets committed will be a good day. =)

caponey’s picture

would it be possible to disable JQuery Update while we configure our Rules? Then enable it when we're finished, or will JQU completely make the Rules not work either

2pha’s picture

@caponey The latest dev version of Jquery Update allows you to specify the default jquery for the admin pages, effectively disabling it.

rv0’s picture

Got burned with this too today.
We need 1.7 for some fancy admin pages in the backend
+1 for getting #37 committed

joelpittet’s picture

The patch in #37 looks very similar to how we fixed coffee over here #1864550: Coffee fails with jquery_update 7.x-2.3+ (2.x-dev) installed.

Though we did a version detect for 1.10

rosell.dk’s picture

Patch #37 works for us as well. +2 for getting it committed (+1 from me, and +1 from my customer ;)

avinash_raut’s picture

Patch is not working for me..

But if you are working in commerce kick start with drupal then just you can solve this problem simply doing five change into it.
Five Key to fix this problem..

1. Download Module Jquery_update and enable it from drupal module.

2. Modify .live to .on in .../profile/commerce_kickstart\libraries\colorbox\jquery.colorbox.min.js (line no. 543)

3. Modify .live to .on in .../profile/commerce_kickstart/modules/commerce_kickstart/commerce_kickstart_search/commerce_kickstart_search.js (line no. 7)

4. Modify .live to .on in .../profile/commerce_kickstart/modules/contrib/commerce_add_to_cart_confirmation/js/commerce_add_to_cart_confirmation.js ( line no. 9)

5. Modify .live to .on in .../profile/commerce_kickstart/modules/contrib/commerce_hosted_pci/js/commerce_hosted_pci.js ( line no. 32)

clear cache and try.

Leeteq’s picture

With so many confirmations, isnt it time to commit #37 to -dev?

Argus’s picture

chrisfromredfin’s picture

Argus - what is the real issue? That link is to a queue. Also, #37 seems to work for me. :)

Argus’s picture

@cwells ignor that, was refering to the huge amount of issues for Rules that have status "need review"! Also https://www.drupal.org/project/issues/rules?status=14 issues that have status Reviewed & tested by the community

cmonkedo’s picture

#37 worked for me.

jordan8037310’s picture

Tried patch #37 but no juice.

Implemented the alternative administrative jQuery as 1.5 instead of site's jQuery 1.7. This solved my issues.

jordan8037310’s picture

//doublepost, sorry

ofry’s picture

jordan8037310, can you give me examples of "no juice"? For sample, try to install Firefox with Firebug extension and give me information from Firebug console.

ofry’s picture

Status: Reviewed & tested by the community » Postponed (maintainer needs more info)
Joe Huggans’s picture

I can confirm that this works if you set

jQuery and jQuery UI CDN = jQuery

No need to apply patch in my case

peterjlord’s picture

@joeuk Thanks! worked for me as well on Version 1.7 and 1.5 for admin

ofry’s picture

But if I set JQuery for admin below than 1.7, I can't use FancyBox UI https://www.drupal.org/project/fancybox

joelpittet’s picture

@ofry in the latest dev of jquery_update (maybe even stable) you can set the admin jquery used different from your front end. So unless you are using fancybox on the back end you shouldn't need to worry here.

I use fancybox as well.

ofry’s picture

joelpittet, no. If I set JQuery for admin pages to 1.5 or default, even if I set to front-end version 1.7+, I can't edit settings of Fancybox module. Because it checks back-end version of JQuery before show settings form.

joelpittet’s picture

@ofry oh sorry didn't know that. I'm running 1.7 on both front and back, it's been the best balance so far. I'm running with patch #37

geek-merlin’s picture

#104:
> I can confirm that this works if you set
> jQuery and jQuery UI CDN = jQuery

HUH, this is strange stuff. I dug the source a bit:
* due to bug #2268035: no case for jquery option as CDN in jquery_update_jqueryui_replace, this reset jquery version to core 1.4.4 but was the only way to do so
* but now this is fixed: #1548028: Make the default jQuery version (1.4.4) for D7 an option

so the right way to do that:
* use the dev version of jquery_update
* and select "Default (provided by drupal)" as admin ui version.

agileadam’s picture

This combo worked for me:

- Patch #37
- Rules 7.x-2.7
- jQuery Update 7.x-2.4
- jQuery 1.8 frontend
- jQuery 1.7 admin (1.8 caused autocomplete to load at top left of screen)
- jQuery and jQuery UI CDN: jQuery

rosell.dk’s picture

@axel.rutz: Ok, thanks for the research, and the explanation why setting jquery as CDN strangely "fixes" our problem. Still, it would be preferable that Rules just works - with any version of jQuery. Patch #37 seems to be the fix, while changing settings in jQuery Update is a workaround. Also consider, that if Rules forces users of jQuery Update to set it up, so it uses the dated version of jQuery that is in core, it means that the Rules module actually requires jQuery Update to be set up to do nothing (for admin ui). While it may be that many only need a newer version of jQuery for the frontend, most people will have it set to a new version on the admin ui as well (being that "Default (provided by drupal)" is a new setting in jQuery Update) - so implementing patch #37 in the next release will spare many people the agony of Rules strangely not working and the trouble of finding the workaround. And don't forget that some do need jQuery update on the admin ui as well. At least I did.

GoddamnNoise’s picture

Totally agree with #113

sch2’s picture

Patch #37 worked for me, thanks.

ofry’s picture

Status: Postponed (maintainer needs more info) » Reviewed & tested by the community
ndf’s picture

It's fixed with jquery_update-7.x-2.x (current dev) and rules-7.x-2.7 (current stable).
So its fixed in jquery_update not in rules.
see: https://www.drupal.org/node/2235771#comment-9298411

ofry’s picture

If I do so, I can't use FancyBox UI. https://www.drupal.org/node/1810656#comment-9197591

danylevskyi’s picture

nielsdefeyter, still not working with jquery_update-7.x-2.x (current dev) and rules-7.x-2.7 (current stable).

ndf’s picture

Hi Danylevskyi,

This are my (working) version options at /admin/config/development/jquery_update
> Default jQuery version: "1.7"
> Alternate jQuery version for administrativ pages: "Default (provided by Drupal)"

jquery_update-7.x-2.4+5-dev
rules-7.x-2.7

Does that help you?

dmsmidt’s picture

Using "Default (provided by Drupal)" works for me as well.
This is also usefull for other modules admin interfaces (like: path_breadcrumbs).

ofry’s picture

see comment #109

dmsmidt’s picture

#109 is no rules issue, please add a new issue to the fancybox issue queue

ofry’s picture

Really? It's rules UI issue because it's NOT working if JQuery > 1.5. And patch ALREADY done and tested many times! Why not commit it???

MrAdamJohn’s picture

@ofry I think it is actually not a newer version of jquery, rather, use of the jquery_update module that allows a different version (an updated one, presumably) to be used for different parts of a site.

There are people using Rules with the newer versions of JQuery without any problems.

This issue queue has what is the best summary of the specifics of this issue as I've seen it.

Simply disabling jquery_update module (if possible) will mitigate the symptoms and verify the issue on your site.

As I see it these issues are related... but if there is another problem hopefully someone will chime in.

Cheers!

ofry’s picture

There are people using Rules with the newer versions of JQuery without any problems.

This issue queue has what is the best summary of the specifics of this issue as I've seen it.

Simply disabling jquery_update module (if possible) will mitigate the symptoms and verify the issue on your site.

Try to reproduce this: set JQuery version for admin pages to 1.5. Rules UI will work! But FancyBox UI will NOT work, because it checking JQuery version before show me UI :(

So it's Rules bug (if it doesn't working with JQuery for administrative pages = 1.7)

andypost’s picture

Please update issue summary and add steps to reproduce

ofry’s picture

Title: Rules UI does not work with jQuery Update 7.x-2.3 » Rules UI does not work with JQuery 1.7+
Issue summary: View changes
dobe’s picture

I have been following this issue for a long time. The issue is Rules interface breaks when using JQuery 1.7+. It is very simple. Enable jQuery 1.7+ on admin pages using jquery update (after all you configure Rules in admin pages). Now go and administer rules. What is that? Oh not working (Selectors are now broken)... Apply patch... It works (Selectors are now functioning).

If you can do those steps and your Rules pages don't end up broken then there is a different issue here. As of right now however, this thread is blistered with a whole bunch of ways to "avoid" it, not one of them saying that is working fine without the patch. The only things that has fixed it is the patch #37.

Please RTBC #37.

aasarava’s picture

Are we sure it's not the overlay that's causing the problem? Stepping jquery update down to "default" doesn't fix the issue, but editing a rule without the overlay fixes the problem for me. Does this work for anyone else?

ofry’s picture

aasarava, yes, I'm sure. You can make sure too, if you install Firefox and Firebug extension for Firefox. Next enable Firebug on rule page and go to "Console" tab. You will see some Javascript errors. And these errors fixed in patch #37.

Leeteq’s picture

It is puzzling that an issue of this nature and between two such important modules keeps lingering among the open issues for so long.

An alternative approach might be a new configurable setting in Rules where we can enforce a specific JQuery version only on Rules pages? Would that help work around similar situations in the future?

ron_s’s picture

We don't use the overlay, and had data selector UI issues with Rules 7.x-2.7 and jQuery Update 7.x-2.4. These issues occurred with our jQuery version set to 1.8. Applying patch #37 resolved the problem.

gagarine’s picture

Patch #37 is working with jQuery Update with "version for administrative pages" set to 1.7, 1.8 and 10.0 but not for 1.5. I don't think it's a problem and encourage maintainer to commit this.

I didn't test the patched without jQuery Update. Anyone did?

ofry’s picture

Hm... I'm see patched Rules UI working for "Default (provided by Drupal)", "1.5" (works same as default JQuery default), "1.7" (data selector opens fine, click on the button works, BUT if I click on autocomplete string, then it normally inserted in textfield. But autocomplete tab closes and does not reopen until I click autocomplete button again).

Maybe, it's JQuery UI 1.10.2 problem.

blacklabel_tom’s picture

Bump! this is working for me, can this be rolled in please?

Argus’s picture

No need to bump because it won't work. See #97-99.

  • pjcdawkins authored 7329e5f on 7.x-2.x
    Issue #1810656 by pjcdawkins, moonray, GoddamnNoise, deggertsen,...
fago’s picture

Status: Reviewed & tested by the community » Fixed
Issue tags: -Needs issue summary update

Thanks all for testing - looks like #37 is solid. I fixed the comments to be less than 80chars and committed #37.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

jagadmarx’s picture

#55 worked for me.

DrCord’s picture

@Argus - does that mean that no new patches or updates are going to be applied to rules?

Argus’s picture

@DrCord: No, I just want to point out there are a lot issues for Rules that have the status "Reviewed and tested by the community", and obviously limmited time by the maintainers. Good this one got commited... :-)

doppel’s picture

#37 works for me. Thanks.

agerson’s picture

Version: 7.x-2.x-dev » 7.x-2.9
Status: Closed (fixed) » Active

I am experiencing this issue again. When JQuery is set to 1.5 all works well. When I change it to 1.7 the rules data selector js does not work. I update both Rules and JQuery Update to the latest prod versions.

heddn’s picture

Status: Active » Closed (fixed)

re #145: It is almost always better to open a follow-up issue, rather than re-open an old issue. You can always cross-post and link them. Moving back to fixed.

goelmk’s picture

When I'm trying edit any rules, there are no links available for "Add Event, "Add Condition" and "Add Action". Tried downgrading jQuery version to 1.5 and even 1.4 but no success. Any help in this regard will be much appreciated.

Thanks in advance!

goelmk’s picture

Status: Closed (fixed) » Active
chellman’s picture

Status: Active » Closed (fixed)

goelmk, please post a new support issue for this. When you do, please provide more information, like any errors or warnings you see in your browser's JavaScript console, what version of Drupal you're running, and so on.

rsvelko’s picture

For those who still have problems with the Data Selector not working:
See https://www.drupal.org/node/1675668#comment-6272178:
"
zhangtaihao commented 5 years ago
For anyone who comes across this issue, I have also encountered a similar problem when using "Production" jQuery from Google CDN (in Performance settings). The "solution" is to not use a CDN.

Weird...
"

So go into jquery_update's settings and disable CDN usage - set to None.
See #2879032: problems when using a CDN to load jquery and jquery_ui

maxplus’s picture

Thanks,
#150 is working for me

tonytheferg’s picture

So I am still experiencing this, and setting CDN to none did work, but I don't know what the ramifications of that are?

Also, if you just save the page with nothing in the selector, the dropdown will return.. Kinda hacky, not sure which would be best.

Dimetry’s picture

Also, if you just save the page with nothing in the selector, the dropdown will return.. Kinda hacky, not sure which would be best.

Thanks for the information.