When adding the Autocomplete Widget to a field on a content type I get:

this.jqObject.data("autocomplete") is undefined
Line 168 in autocomplete_deluxe.js

This breaks the rest of the page and things like the wyiswyg is not loading.

I use latest version of Drupal 7.8.

Comments

madeby’s picture

Version: 7.x-1.x-dev » 7.x-1.0-beta5
Priority: Major » Critical

Anyone?

I think the error is in this code:

// Since jquery autocomplete by default strips html text by using .text()
// we need our own _renderItem function to display html content.
this.jqObject.data("autocomplete")._renderItem = function(ul, item) {
return $("<li></li>").data("item.autocomplete", item).append("<a>" + item.label + "</a>").appendTo(ul);
}; 
sepgil’s picture

Status: Active » Postponed (maintainer needs more info)

Please try the dev version, I have not experienced any problems with drupal 7.8.

mojiro’s picture

I found that search_autocomplete conflicts with autocomplete_deluxe

Working ->
Drupal: 7.9
autocomplete_deluxe: 7.x-1.0-beta5/2011-Aug-08
Jquery_update: none
Jquery: none
search_autocomplete: none

Working ->
Drupal: 7.12
autocomplete_deluxe: 7.x-1.0-beta5/2011-Aug-08, 7.x-1.x-dev/2012-Jan-19
Jquery_update: none, dev, beta
Jquery: none, 1.5, 1.7
search_autocomplete: disabled

Not Working ->
Drupal: 7.12
autocomplete_deluxe: 7.x-1.0-beta5/2011-Aug-08, 7.x-1.x-dev/2012-Jan-19
Jquery_update: none, dev, beta
Jquery: none, 1.5, 1.7
search_autocomplete: 7.x-2.1/2012-Jan-19

hass’s picture

Component: Code » Single values - allow new values
Status: Postponed (maintainer needs more info) » Active
IT100’s picture

Component: Single values - allow new values » Single values

Conflict with Apache Solr autocomplete as well

http://drupal.org/node/1530888#comment-7323176

pjcdawkins’s picture

Version: 7.x-1.0-beta5 » 7.x-2.0-beta2
StatusFileSize
new926 bytes

This bug exists in the last recommended version (7.x-2.0-beta2), but in 7.x-2.x-dev the JS file seems to be completely different.

In 7.x-2.0-beta2 I made the attached changes as a hotfix.

sepgil’s picture

Status: Active » Needs review
pjcdawkins’s picture

Status: Needs review » Active

@sepgil nothing can be reviewed - as stated my patch won't apply to -dev, just -beta2.

I also think that this is only going to affect those using jQuery >= 1.10, e.g. via the jQuery Update module.

Anyway this suggests that -beta2 should no longer be a 'recommended' release.

mjgruta’s picture

Issue summary: View changes

I'm also having problem with this on Rules. The data selector is showing the wrapper

and some part of it is not working because of the javascript error.

I'm using the following versions:
Autocomplete Deluxe: 7.x-2.x-dev
jQuery Update: 7.x-2.3+15-dev
jQuery Version: 1.7
Rules: 7.x-2.6+1-dev

The Rules works when I use jQuery Version: 1.5.

peter caritas’s picture

StatusFileSize
new1.59 KB

Here's a patch on 7.x-2.x-dev. I can confirm that the issue only occurs with newer versions of Jquery. I'm not sure exactly which version of jquery breaks it, but I am using 1.8. This patch should be backward compatible with 1.4 I've tested it with both 1.4.4 and 1.8.

hass’s picture

Status: Active » Needs work

Please remove the tabs and set a patch to needs review state.

anybody’s picture

We're using jQuery 1.7 and have the problem, so I think this may be the problematic release.

ging74ru’s picture

I'm using jQuery1.7 (jQuery Update 7.x-2.3) and it's ok. But jQuery Update 7.x-2.4 breaks my autocomplete deluxe widget.

Autocomplete Deluxe version is 7.x-2.0-beta3.

sachbearbeiter’s picture

I'm using jQuery Update 7.x-2.4 with jQuery1.7 - it breaks my autocomplete deluxe widget.
Autocomplete Deluxe version is 7.x-2.0-dev

maybe you should fix this and some sort of jQuery Update should be required ...

the patch of #10 worked for me

sepgil’s picture

... and some sort of jQuery Update should be required

Yeah, that won't happen. If we fix this issue, than so that it still works without jQuery Update, since jQuery Update tends to break other modules as well.

wOOge’s picture

#10 Patch works for me as well. I'm using jQuery Update 1.7 (admin / default)

acb’s picture

I can confirm patch in 10 works with jq update ver. 7.x-2.4.

I don't get a sense as to whether we should go ahead and apply the patch or if the module is going to be updated to deal with this issue.... What's the story?

peter caritas’s picture

My patch (#10) tests for existence of the autocomplete-ui object. So it should work regardless of the version of jquery / jquery ui or whether or not jquery update is installed. I've tested it without jquery update installed and it worked fine. Let me know if you need me to do anything to this patch.

rcodina’s picture

I also confirm that #10 patch works for me. My config:

Drupal 7.28
jQuery Update 7.x-2.4 (jQuery 1.8 for admin pages)
Autocomplete Deluxe 7.x-2.x-dev

I pray for this patch to get commited ASAP.

govind.maloo’s picture

#10 patch works for me.

rcodina’s picture

Status: Needs work » Reviewed & tested by the community
f0ns’s picture

Patch #10 works for me, thanks a lot!

sebto’s picture

Patch #10 works! THANKS!

ousmaneo’s picture

patch #10 worked. Thanks!

rcodina’s picture

Please, also checkout the patch in this other issue: https://www.drupal.org/node/2276111

I think the patch there is more complete than #10 because it makes this module work under jQuery 1.10. Patch on #10 doesn't work with 1.10.

sepgil’s picture

Status: Reviewed & tested by the community » Fixed

I committed the patch from #2276111: Uncaught TypeError: Cannot read property 'msie' of undefined (jquery 1.10), so this issue should be fixed to. Thanks for all the contributions to this issue.

Status: Fixed » Closed (fixed)

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