The current Drupal core autocompletion has some limitations that we would like to get rid of for Linkit 7.x-2.x.

These limitations consists mainly of:

  1. The "slash bug" #1024460: Slashes doesnt work with autocomplete (waiting for D7 update to fix this) which cannot be resolved until Drupal core fixes it (it seems like it won't happen). This affects Linkit hard since external URI:s will generate an error which can't be controlled by Linkit
  2. We would potentially like a grouping feature, which groups nodes, users etc. together in the autocomplete results. This is not possible atm.
  3. Restriction of only sending one key-value param for a result in auto-complete. At the moment, the key consists of the plain text that should be inserted into the form field ("Title [path:node/123]" for Linkit), value consists of the HTML that should be inserted into the result row. We may want to send other params as well, and we could, as a bonus, also generate most of the HTML client side instead. E.g. we could send a JSON-object instead consisting of many keys-value pairs, like "type, systemPath, alias, title, description, imageSrc" etc. No limitations, that is!
  4. Event-driven architecture. Drupal autocompletion is poorly extensible/designed so there are no (good) ways for module developers to communicate with the autocomplete field. There are no client side event callbacks available for interaction with the user nor the server so no messages from autocomplete to Linkit. There are also no ways to control autocompletion, for example to make it start completion after at least three characters are typed. So no messages from Linkit to autocomplete either! We could design this much better.

All this appearantly sucks bad, and I'm not touching those ugly "Hey, I found a nice hack" thingys in the first place, so my suggestion, obviously, is to build an entirely new, shiny, bug-free and extensible autocomplete feature for Linkit. Nothing prevents us to use the existing code and some guy already understood this and wrote some things which we could hopefully use as well.



anon’s picture

Assigned: Unassigned » betamos
Status: Active » Fixed

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