Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Right now if you attempt to enter something into an autocomplete field (e.g. Tags), nothing happens.
This has come up in a few issues from people thinking they were somehow hallucinating. While I cannot attest to the recreational drug use among our contributor pools, I can confirm the same thing happens on my machine and I am stone-cold sober.
Comment | File | Size | Author |
---|---|---|---|
#10 | core-autocomplete-1893400-10.patch | 638 bytes | nod_ |
#7 | drupal8.form-autocomplete-hidden.7.patch | 1.46 KB | sun |
#4 | drupal-1893400-4.patch | 1.12 KB | dawehner |
#3 | drupal-1893400-3.patch | 675 bytes | dawehner |
#2 | 1893400-2.patch | 610 bytes | swentel |
Comments
Comment #1
swentel CreditAttribution: swentel commentedBeen seeing this as well - you should also get 'Theme hook hidden not found' in your watchdog - I *think* this is related to #1812724: Consolidate all form element templates and add theme_hook_suggestons which removed theme_hidden().
Comment #2
swentel CreditAttribution: swentel commentedSo yeah, this fixes it ..
But there's a big todo in form_process_autocomplete(), not sure what todo with that
Comment #3
dawehnerI had the same fix on my system, though what about this?
It simulates what '#type' => 'hidden' does?
Comment #4
dawehnerAdapted the documentation at the top.
Comment #5
swentel CreditAttribution: swentel commentedWorks for me.
Comment #6
webchickSo of the two, #2 definitely looks better to me, but it fails tests. #4 though does what theme_hidden() used to be doing before it was removed, so it's the more proper fix. But we might want to look into that later, because I'm not sure anyone in the universe (other than the fabulous dawehner, of course :D) would know to set both + '#theme' => 'input__hidden', and + '#pre_render' => array('form_pre_render_hidden'),
Committed and pushed to 8.x. YAY! Thanks. :D
Comment #7
sunLet's use a regular element and the regular built-in facility to ignore user input and the value of a form element.
Comment #8
dawehneroh cool!
Comment #9
webchickMuch more betterer, thanks. :)
Committed and pushed to 8.x.
Comment #10
nod_was broken. no id on input broke JS.
Comment #11
sunOh. I'm sorry. Yes, #type hidden does not get an HTML ID by default, since no one usually needs to target those fields... so yeah, it needs to be in 'attributes'.
Comment #12
aspilicious CreditAttribution: aspilicious commentedYeah previous patch maybe needed a manual review ;)
It works now with the latest patch.
Comment #13
webchickD'oh. :P
Committed and pushed to 8.x. Hopefully this is done for good now? :)