Have a look at
http://cgit.drupalcode.org/drupal/commit/?h=7.x&id=be00a1ced4104d84df2f3...

This commit to Drupal core changed the API for autocomplete. Now you need an additional key #autocomplete_input.
This can be achieved by adding form_process_autocomplete() in #process, just like for 'textfield' in system_element_info().

Maybe you could check function_exists(), so it does not break with older Drupal core versions.

Comments

donquixote created an issue. See original summary.

donquixote’s picture

donquixote’s picture

Status: Active » Needs review
donquixote’s picture

Different approach with function_exists(), so it does not break in prior versions of Drupal core.

shashikant_chauhan’s picture

Status: Needs review » Reviewed & tested by the community

Hi,
I am also facing problem with Entity Reference Autocomplete & drupal 7.39.
I tried the patch 2, and its working fine.

  • slv_ committed 570c142 on 7.x-1.x authored by donquixote
    Issue #2561431 by donquixote: Elements with autocomplete require #...
slv_’s picture

Thanks for the patches donquixote.

This was already reported in #2554553: Autocomplete broken in Drupal 7.39. I'll solve it in this issue as the solution with the function_exists check is not in the other one. I didn't apply last patch, but a combination of the patches in #2 and #4, as I prefer to have the #process function in the element_info() declaration, rather than called dynamically.

Since that function is in form.inc, which is called whenever Drupal gets fully bootstrapped, there shouldn't be a problem with that, and just flushing all caches should get it added to the #process array too.

Fixed in http://drupalcode.org/project/entityreference_autocomplete.git/commit/57.... Will go into next stable release \o/.

slv_’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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