Updated: Comment #0
Follow-up from #1987858: Convert taxonomy_autocomplete() to a new style controller and #2056627-22: Form API autocomplete is broken for routes where @tim.plunkett said
If we convert the taxonomy autocomplete before this goes in, then it too will be broken...
If that is the last usage of #autocomplete_path, why not put this in now, and then remove #autocomplete_path over there.
Problem/Motivation
In #2056627: Form API autocomplete is broken for routes we have added route based autocomplete #autocomplete_route
. Developers should use #autocomplete_route going forward instead of #autocomplete_path.
Proposed resolution
Remove #autocomplete_path
from form_process_autocomplete
in form.inc
.
Remaining tasks
More discussion and patch.
User interface changes
None.
API changes
New api is added in #2056627: Form API autocomplete is broken for routes we are removing old api.
Related Issues
Comment | File | Size | Author |
---|---|---|---|
#8 | drupal8.forms-system.2071115-8.patch | 6.31 KB | amateescu |
#8 | interdiff.txt | 3.24 KB | amateescu |
#5 | drupal8.forms-system.2071115-5.patch | 6.54 KB | jibran |
#5 | interdiff.txt | 2.99 KB | jibran |
#3 | drupal8.forms-system.2071115-3.patch | 6.53 KB | jibran |
Comments
Comment #1
jibranLet's see how much it fails.
Comment #2
dawehnerMh, actually the one-line description of a function should be one-line.
What about also setting #autocomplete_route_parameters to FALSE or an empty array.
Comment #3
jibranThank you for the review @dawehner fixed #2.
Comment #5
jibranTest Fixes
Comment #6
dawehnerHa, this makes totally sense.
Comment #7
catchCan we not default #autocomplete_route_parameters to an array if #autocomplete_route is set?
Comment #8
amateescu CreditAttribution: amateescu commentedWe do that already, those assignments in system_element_info() were totally not needed.
Here's the relevant part from form_process_autocomplete():
Fixed that and the doxygen of form_process_autocomplete() which was missing the example path.
Comment #9
dawehnerPerfect!
Comment #10
catchCommitted/pushed to 8.x, thanks!
Will need a change notice.
Comment #11
dawehnerAdapted the change notice in https://drupal.org/node/2070985/revisions/view/2813769/2877155
Comment #12
jibranFixed the change notice title and added issue to change notice. Thank you everybody for the help.