Something's wrong with our (Stark) autocomplete fields. Dunno why... :) Should have been fixed in #1893400: Autocomplete is busted.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | fix_twig_autocomplete.6988462.5.patch | 604 bytes | alexrayu |
| #2 | why-ajax-broken.png | 23.53 KB | alexrayu |
Comments
Comment #1
alexrayu commentedAutocomplete is busted because the invisible autocomplete elements does not get into the page in Stark (but it gets on the page and works with phptemplate).
Comment #2
alexrayu commentedNo. False alarm. Twig engine receives it correct.
Comment #3
alexrayu commentedI have tracked the issue to twig's doDisplay(). It receives the necessary data. Somewhere during the rendering, it's lost.
How I can I debug it from here?
Comment #4
alexrayu commentedFurther update: input.html.twig seems to be the culprit.
Update: input.html.twig receives the rendered element already without it's hidden autocomplete counterpart.
Update: the autocomplete is filtered out at theme() in common_inc line 5494 (render())
Comment #5
alexrayu commentedAttaching a fix for autocomplete.
The issue is this: common.inc
drupal_render()seems to have broken logic. There is an element and there are elements children. It tries to render an element into it children's key, and then twig templateinput.html.twigprints out{{ children }}. But it's not healthy to merge it like this. Current solution makes it work, but it needs to be reworked, probably.Comment #6
alexrayu commentedComment #7
jpamental commentedtested the patch, fixed the issue with no errors. committing to sandbox.