Problem/Motivation
The original list of values is getting hidden with only the "other" textfield to being displayed. This issue was introduced in 4.2.1, I suspect accidentally, while trying to fix #3556770: Fix eslint.
Steps to reproduce
Create a list field in a content type and display it using the Select or Other formatter.
Proposed resolution
Replace .replace('other-select', 'other-other') with the original .replace('select', 'other')
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 3558004-multiple_value_select_list_does_not_render_existing_values.patch | 620 bytes | vensires |
Issue fork select_or_other-3558004
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
vensiresThe MR fixes the issue.
Attaching patch for use in composer-patches directive until this is fixed.
Comment #4
vensiresThere is a small case this change was intended to fix #3171843: Multiple-value checkboxes do not render existing values though I doubt since it was altered in a completely different issue.
In any case, you might want to also check that issue too... just in case!
Thank you!
Comment #5
ivnishI fixed this because IMHO, it doesn't work properly. Now with my fix:
Your code:
Comment #6
vensiresI think we need more feedback from other users…
The experience I have from my site is not the same you show in your gif.
I will try to reproduce in a simplytest environment next week and come back here.
Comment #7
vensiresI just tried this in a completely new Drupal 11 installation with nothing else installed but the Standard profile and this module.
I set the "Tags" field of the "Article" content type to use "Select or other" formatter. The rendered widget was this one; only the Other field:
After installing the "cweagans/composer-patches" package and my patch from above, I get the following widget:
In case you need it, I attach my configuration too.
Comment #8
ivnishOk, I understand now. My code fixed the "List" field, but broke Entity reference field. It can affect a lot of existing sites and I think we need to revert my fix. Thanks!
Comment #10
ivnishComment #12
vensiresThank you for the quick fix @ivnish
Do we have another issue for the list? This one maybe: #3171843: Multiple-value checkboxes do not render existing values?
So that we continue the discussion there over that topic.
Comment #13
ivnishI tested checkboxes, they work fine