Closed (works as designed)
Project:
Rules
Version:
7.x-2.12
Component:
User Interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
17 Feb 2020 at 19:27 UTC
Updated:
25 Mar 2020 at 09:49 UTC
Jump to comment: Most recent
Comments
Comment #2
tr commentedAre you using jQuery update?
I don't understand how to reproduce your issue. What does "if an item should be choosen from a list" mean? Please give detailed step. Tell us what page you are on (/admin/config/workflow/rules ?), tell us what buttons you push, what value you enter, and in what order. Tell us when this error happens and where do you see the error. Right now we do not have enough information to figure out why this is happening on your site or if it's even a problem with Rules.
Rules doesn't use jQuery for anything other than the data selector autocomplete - select lists such as you will see when choosing an event, condition, or action do not use jQuery. Rules also uses jQuery for the debug logging, but this will be loaded only if you have debug logging enabled (you didn't mention whether you were using this ...). If the jQuery error was generated by anything other than use of the autocomplete or debug log, then it's highly unlikely this is a problem with Rules.
Of course, if your theme is using jQuery to style or customize the form elements like the select list, then perhaps your theme is causing an issue.
Comment #3
tr commentedCan't help you if you don't respond ...
Comment #4
tr commentedComment #5
junaidpvI can confirm this error. It happens when we use jQuery update with jQuery 1.7 (may be with later versions of jQuery too).
For me it happened while adding action "Set a data value" on a rule with event "Before saving a taxonomy term of vocabulary xxx".
It does not show drop-down list for "Data selector" field.
Not a serous issue (for me at least), as I can set older version of jQuery for admin interface or just set so temporarily while working on rules.
Comment #6
tr commentedRules will remain compatible with the standard version of jQuery distributed with Drupal 7. If you use a newer version of jQuery, that may not be compatible with either Rules or Drupal itself. The jQuery Update module tries to insulate you from some of those jQuery incompatibilities, but in many cases it it not possible to write jQuery code that will run correctly in both a very old version of jQuerey (as distributed with Drupal) and in a new version of jQuery. This is a long-standing problem in Drupal 7 because of the way third-party dependencies are included, because of the Drupal 7 backwards-compatible and API change policies, and because of the age of Drupal 7 which means that core dependencies were locked in more than 10 years ago. All these issues are well-known and documented. One place is https://www.drupal.org/docs/7/theming/using-newer-versions-of-jquery but this is discussed everywhere in both official Drupal documentation and in blogs, tutorials, and other information sources across the web.
If you can provide a PATCH that will change the Rules JavaScript code so that it supports BOTH the Drupal-default version of jQuery AND the most recent jQuery Update version, then we can commit that to Rules after suitable testing. Until then, we are going to continue to support only the Drupal-default version of jQuery, especially now when Drupal 7 is nearing its end-of-life and we are prioritizing bug fixes and stability over new features.
Comment #7
pal_ur commentedAfter a lot of testing, I figured out, that really jQuery Update module causes JavaScript error.
It was quite difficult to figure out, what should I see, because non of the data selectors and the data selector's helpers are working.
Yes, it's a good workaround to turn off jQuery Update module.