Can’t locate the source of this problem, but suddenly rules autocomplete doesn’t work anymore.

Here: Chrome error log:

Uncaught TypeError: Cannot set property '_renderItem' of undefined
rules.autocomplete.js:108

Drupal.rules.autocomplete
rules.autocomplete.js:108

Drupal.behaviors.rules_autocomplete.attach
rules.autocomplete.js:12

b.extend.each
jquery.js:34

b.fn.b.each
jquery.js:27

$.fn.once
jquery.once.js:55

Drupal.behaviors.rules_autocomplete.attach
rules.autocomplete.js:10

Drupal.attachBehaviors
drupal.js:55

b.extend.each
jquery.js:33

Drupal.attachBehaviors
drupal.js:53

Drupal.theme.placeholder
drupal.js:391

b.extend.ready
jquery.js:30

uj
query.js:38

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ErnestoJaboneta’s picture

Component: Rules Core » Rules Engine

I'm having the same issue.

mlsamuelson’s picture

This one's affected me as well.

Everything was fine while I set up a number of rules for my site, then returning to the Rules admin UI a few weeks later, attempting to update a data compare condition, I get the error noted above, and the data value's data selector doesn't work. Additionally, I cannot open any collapsed fieldsets (probably because javascript has errored out).

After futzing around with trying to debug this and having no luck, I started disabling modules.

Turing off Apache Solr Autocomplete gets me my Rules JS back. Not sure as to the ultimate cause yet.

Sk1Zy’s picture

Had the same issue, disableing "Search Autocomplete" module fixed it for me.

designcontext’s picture

Same here! Search autocompete - 10 grey hairs more...

seanr’s picture

Same here. Luckily I found this post on the first try. It'd be nice to get to the bottom of this, but alas I'm not nearly proficient enough with JavaScript to chase this one down. :-/

pjcdawkins’s picture

Component: Rules Engine » Rules Core
Status: Active » Needs review
FileSize
783 bytes

It's probably to do with different versions of jQuery UI. Try this, but this might only be for users with jQuery Update.

Status: Needs review » Needs work

The last submitted patch, rules-1410978-6.patch, failed testing.

seanr’s picture

Status: Needs work » Needs review

#6: rules-1410978-6.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, rules-1410978-6.patch, failed testing.

seanr’s picture

Status: Needs work » Needs review

Actually, that passed, not sure why the bot posted that incorrectly. See here for background on the testbot weirdness:

http://drupal.org/node/1501962#comment-7439564

pjcdawkins’s picture

There probably isn't a test relating to this JS file anyway.

My patch in #6 solves the problem for me... but I think it's specifically to do with sites that are running later versions of jQuery UI (perhaps >=1.10).

mattsmith3’s picture

I can confirm this issue- which now happens with the latest dev branch of jquery_update. Patch did not work for me. I got a new error:

Uncaught TypeError: Cannot set property 'close' of undefined
Drupal.rules.autocomplete
(anonymous function)
e.extend.each jquery.min.js:2
e.fn.e.each jquery.min.js:2
$.fn.once jquery.once.js:55
Drupal.behaviors.rules_autocomplete.attach
(anonymous function) drupal.js:76
e.extend.each jquery.min.js:2
Drupal.attachBehaviors drupal.js:74
Drupal.ajax.commands.insert ajax.js:542
Drupal.ajax.success ajax.js:400
ajax.options.success ajax.js:164
c.success jquery.form.min.js:11
n jquery.min.js:2
o.fireWith jquery.min.js:2
w jquery.min.js:4
d jquery.min.js:4

mattsmith3’s picture

jquery_update 7.x-2.3 resolves the issue for now.

pjcdawkins’s picture

FileSize
1.04 KB

@mattsmith3 the attached patch fixes the further problem you mention in #12. Again it's just to work with later version(s) of jQuery UI - I think 1.10 and later.

fago’s picture

Title: Cannot set property '_renderItem' of undefined (rules.autocomplete.js:108) » After jQuery Update: Cannot set property '_renderItem' of undefined (rules.autocomplete.js:108)
pjcdawkins’s picture

Status: Needs review » Closed (duplicate)

Thanks @fago. I think this is really a duplicate of that thread.

pjcdawkins’s picture

Issue summary: View changes

log attached