Needs work
Project:
Entity reference
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
6 Jan 2012 at 18:57 UTC
Updated:
11 Jul 2015 at 09:59 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
patmacs commentedI'm getting this error as well. subscribing
Comment #2
jdlind38 commentedI had the same issue. I noticed that the Field Permissions module pushed out a new beta (7.x-1.0-beta2). The autocomplete started to work and the error went away. Make sure that the "Don't sort" option is selected in the reference field.
Sounds like EntityMalformedException is having the same issue.
Comment #3
zilla commentedi'm having the same issue as well, only when using one of the two available autocomplete options (select and radio are fine). i do not use field permissions module, and i'm at a loss regarding the source of this issue. however, i suspect some kind of module conflict, though not sure what would be the hitch...
Comment #4
LEternity commentedSubscribe
Comment #5
chrisschaub commentedI think entityreferece is breaking all of my autocomplete widgets. It's the odd man out. I'm getting the same error, tried upgrading field_permissions. But no luck. Trying to debug.
Comment #6
jordanmagnuson commentedIn my case the devel_themer / simplehtmldom modules were causing this.
Comment #7
Rebekaloz commentedThis happens when some contributed modules are enabled.
Here Alexey from Italy sais: " I found out what causes AJAX error! When I turn on any module with utf8 incoding it causes the error, when i change the encoding to ANSI or to utf8 without BOM, everything works. This incoding problems happened only in Google chrome, in Firefox all encodings work well "
http://stackoverflow.com/questions/7859823/an-ajax-autocomplete-textfiel...
I just need to know how to change a module encoding. How to apply Alexey solution.
Any ideas how to change a module encoding?
Comment #8
lsolesen commentedIs this still an issue with the latest dev, then please update the Version field and set back to active.
Comment #9
player259 commentedsame issue, latest dev
workaround
entityreference.module line 1069
add exit();
after drupal_json_output($matches);
Comment #10
charlie charles commentedHi player259
can you make a patch for this please?
Comment #11
isolate commentedPlease note this could be due to your entity not having a proper label callback but it's using a standard callback function for it: "entity_class_label". You should change this and implement the callback yourself.
Otherwise you will get this notice: Notice: Undefined index: label in Entity->defaultLabel() (line 146 of entity/includes/entity.inc). (Which will throw the AJAX error ofcourse)
Comment #12
foagth commentedin my case, autocomplete didn't work for 2 fields referencing a term and a node type.
The ajax error message did actually have the expected result in the response.
The fix was to use jquery update module and set the jquery 1.8 as the default.
This also fixed another error with the date popup not displaying.
I'm using ent ref version 1.1
Comment #13
Jaza commentedSame as player259 in #9, I fixed this by adding drupal_exit() at the end of the AJAX callback function.
Patch attached - would be good to get this into the module.
Comment #15
yfarooq commentedin my case it was twitter module https://www.drupal.org/project/twitter
if your using twitter module you might disable twitter module and check if everything work.