in autocomplete.js line 212
there is :
li.autocompleteValue = key;
this basically means that the array from an autocomplete function should always have the "name/value" as index key. it's ok when the array is for unique values like a username, but for taxonomy or other things which could potentially have the same name, it will lead to the array only containing part of the items if there are many items with the same "name".
This actually leads to another bug in taxonomy_autocomplete($vid, $string = '') which will definitely lead to return only a subset of taxonomy if there are some taxonomies with the same name.
A solution could be just change line 212 of autocomplete.js to
li.autocompleteValue = matches[key];
Thanks
Comments
Comment #1
rfayIf I'm not mistaken this is a long-term flaw in Drupal's approach to autocomplete. It's typically dealt with by adding a unique element onto the string (as nodereference does by adding [nid:333333] onto the end of the string.)
If you have a real approach to solving this that is not an API change, more power to you. If it's an API change (probable) then this is for 8.x.
But I personally am all ears.
Comment #2
mdupontBumping to 8.x-dev
Comment #9
joegl CreditAttribution: joegl commentedThis would be nice...