Reverting back to jQuery update 7.x-2.3 fixed the issue.

jQuery version: 1.7 (front + admin).

Rules: add a data comparison condition, data selector has a JS error:

TypeError: 'undefined' is not an object (evaluating 'this.jqObject.data("autocomplete")')
autocompleteundefined:107
(anonymous function)
eachjquery.min.js:2:18168
eachjquery.min.js:2:14714
oncejquery.once.js:55
attach
(anonymous function)drupal.js:76
eachjquery.min.js:2:18119
attachBehaviorsdrupal.js:74
insertajax.js:542
successajax.js:400
successajax.js:164
successjquery.form.min.js:11:6212
njquery.min.js:2:29308
fireWithjquery.min.js:2:30073
wjquery.min.js:4:11407
djquery.min.js:4:17220
undefined:107

Comments

mengi’s picture

I can confirm this error. I am not able to pick a data selector, the dropdown doesn't show, when adding a action or condition. I also can't click on the 'data selector' dropdown that is below the input. Rules UI will work when Default jQuery Version is set to 1.5, but nothing else.

It seems that the 'Alternate jQuery version for administrative pages' setting is ignored. Even if I pick 1.5 for the setting, Rules UI will only work if the 'Default jQuery Version' setting is on 1.5.

sascher’s picture

confirmed I am having the same issue

markhalliwell’s picture

Status: Active » Closed (works as designed)
Issue tags: -rules

I have updated the release notes of jquery_update 7.x-2.4 to reflect the change that occurred and the solution to fix it:

Important:

#2102211: Default to the latest version of jQuery changed the default version from 1.5 to the latest available jQuery version, in the case of 7.x-2.4: 1.10.

If your site has never set the jquery_update_jquery_version variable, it will now default to the latest jQuery version available.

If any modules break because of this update, you should open an issue with the relevant module so it can update it's code to support newer versions of jQuery. jQuery Update has always allowed a site to choose which jQuery version is appropriate for that particular site (ie: what works with other installed libraries). Opening issue and declaring that jQuery Update has broke your site will be "Closed (works as designed)".

To mitigate the pain of upgrading and waiting for the affected module(s) to fix their code, you can temporarily set the version being used back to 1.5.x in /admin/config/development/jquery_update, or by adding the following to your settings.php file:

$conf['jquery_update_jquery_version'] = '1.5';
E Johnson’s picture

Changing back to jQuery 1.5 for the Admin in jQuery Update introduces a different error in Console to debug:

TypeError: this.element.prop is not a function
/admin/config/workflow/rules/reaction/manage/rules_page_slideshow_rule/add/2/condition
Line 3

This will still make the Data Selector in Rules broken. There's also a lot of notices when you clear cache.

Running: jQuery Update 7.x-2.4

I'll have to look into going back to jQuery Update 7.x-2.3 to see if the problem still exists.

khayong’s picture

The patch from https://www.drupal.org/node/1548028#comment-7983779 is working for me. It provided another option Default (provided by Drupal).

citricguy’s picture

The patch @khayong referenced worked for me as well, but I did need to set the "Alternate jQuery version for administrative pages" in admin/config/development/jquery_update specifically to version 1.5.

Rules UI is working again for me now.

areynolds’s picture

The patch from https://www.drupal.org/node/1548028 has been committed and will be in 7.x-2.5 of jQuery Update (currently in the dev branch).

ndf’s picture

Version: 7.x-2.4 » 7.x-2.x-dev
Status: Closed (works as designed) » Fixed

Works for me too (7.x-2.x today).

Settings:
default jquery version: 1.7 or higher
alternate jquery version for administrative pages: 1.5 or "Default (provided by Drupal)".

With jquery_update-7.x-2.4 (current version) above configuration does not work with Rules UI. The only way to get Rules UI working is put default and administrative to version 1.5 or "Default (provided by Drupal)". Higher jquery versions break ajax-callback (rules token selector).
With jquery_update-7.x-2.x-dev (current dev version) above configuration does work.

@ #3: Source of the problem is the ajax callback that loads the frontend (default) version.
Specifically this chunk (line 97-103) solves the issue:

    // 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('default', '1.5', '1.6', '1.7', '1.8', '1.9', '1.10'))) {
        $version = $ajax_version;
      }
    }
ndf’s picture

Crosslink to Rules issue queue: https://www.drupal.org/node/1810656

Status: Fixed » Closed (fixed)

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