Something's wrong with our (Stark) autocomplete fields. Dunno why... :) Should have been fixed in #1893400: Autocomplete is busted.

Comments

alexrayu’s picture

Autocomplete 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).

alexrayu’s picture

StatusFileSize
new23.53 KB

No. False alarm. Twig engine receives it correct.

alexrayu’s picture

I 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?

alexrayu’s picture

Further 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())

alexrayu’s picture

StatusFileSize
new604 bytes

Attaching 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 template input.html.twig prints out {{ children }}. But it's not healthy to merge it like this. Current solution makes it work, but it needs to be reworked, probably.

alexrayu’s picture

Status: Active » Needs review
jpamental’s picture

Status: Needs review » Fixed

tested the patch, fixed the issue with no errors. committing to sandbox.

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

Project: » Lost & found issues

This issue’s project has disappeared. Most likely, it was a sandbox project, which can be deleted by its maintainer. See the Lost & found issues project page for more details. (The missing project ID was 1750250)