Problem/Motivation
The default value widget in Field UI may depend on the field config that is being set on the same form. Regardless of this, the default value widget is not updated when these settings change. This leads to a confusing experience. For example, if you change the allowed bundles for an entity reference field, the default value widget still allows you to reference entities based on what was allowed on the saved field config, not what has been selected on the form.
Steps to reproduce
- Install Umami
- Create a new taxonomy term reference field
- Select "Tags" as the allowed vocabulary
- Set a default value and search for "Accompaniments" which is actually a "Recipe Category" and see that its still displayed
- Save, and see there's a form validation error
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Comment | File | Size | Author |
---|---|---|---|
#6 | default.png | 42.46 KB | viren18febS |
#3 | drupal10.2.png | 51.18 KB | viren18febS |
#3 | tags-field.png | 6.67 KB | viren18febS |
Issue fork drupal-3384583
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:
- 3384583-default-value-widget changes, plain diff MR !4887
Comments
Comment #2
viren18febS CreditAttribution: viren18febS at Concinnity Media Technologies for Concinnity Media Technologies commentedChecking the issue!
Comment #3
viren18febS CreditAttribution: viren18febS at Concinnity Media Technologies for Concinnity Media Technologies commentedHi @lauriii
I have checked the issue in Drupal 10.2.0-dev and not able to reproduce the issue. screenshot attached for reference, please review.
Comment #4
smustgrave CreditAttribution: smustgrave at Mobomo commentedAlso just tested this on 11.x Umami and was not able to replicate. Is there a missing step?
Comment #5
lauriiiDid you test this on the default value widget? Based on the screenshot in #3 it's not clear if that's the case or not.
Comment #6
viren18febS CreditAttribution: viren18febS at Concinnity Media Technologies for Concinnity Media Technologies commented@lauriii
I have created a Term reference field & select Tag as the allowed vocabulary and not changed any configuration for widget. I have attached a screen shot, please review.
Comment #7
smustgrave CreditAttribution: smustgrave at Mobomo commentedConfirmed the issue following steps in Issue summary.
Comment #10
srishtiiee CreditAttribution: srishtiiee at Acquia commentedComment #11
smustgrave CreditAttribution: smustgrave at Mobomo commentedSlightly updated steps to reproduce.
Manual testing following the steps in the issue summary confirmed when setting the default value I can search other vocabularies outside tags.
MR did resolve the issue.
Rebased the issue to run the test only feature
Which is good.
Comment #15
lauriiiCommitted 710ae1c and pushed to 11.x. Also cherry-picked to 10.2.x. Thanks!