autocomplete text fields correctly show matching entries if some are found.
if nothing is found, some js functions are returned and displayed (see attachment)
this behavior occurs with the profile module and the messages module, so i guess it's a problem with the forms system
tested on win (xampp), red hat linux (apache)
| Comment | File | Size | Author |
|---|---|---|---|
| autocomplete2.png | 4.1 KB | black silence |
Comments
Comment #1
black silence commentedfound the problem:
When drupal_to_js gets an associative array, it is output as json object. When the array is empty, the function returns a json array (because it doesn't know that the array is associative)
The modules listed in my first post use drupal_to_js (or drupal_json), but want their output as json object.
To workaround this i have to call the function with an empty object instead of an empty array (if the array is empty).
setting prio to minor because of workaround
Comment #2
arithmetric commentedThis seems to be the same issue described in #784670: autocomplete.js can iterate over functions in Array objects.