Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Coming from the review in #1847596-119: Remove Taxonomy term reference field in favor of Entity reference and the following discussions, I think the easiest actionable item for the moment is to not select all bundles by default and make the element required.
Comment | File | Size | Author |
---|---|---|---|
#1 | 1953444.patch | 2.28 KB | amateescu |
Comments
Comment #1
amateescu CreditAttribution: amateescu commentedComment #2
xjmSo, I agree that this field needs to be required, technically speaking, since a reference field that doesn't reference anything doesn't make sense. I'm still concerned that this is "visibility through validation error" and doesn't entirely solve the original UX problem, but that should be addressed separately.
Thanks @amateescu!
Comment #3
xjmFiled #1953568: Make the bundle settings for entity reference fields more visible. for the larger usability problem.
Comment #4
xjmComment #5
xjmComment #6
webchickOk, so I guess the point in doing this is so to address "This is the most important part of the form and I skipped right past it" and "It's not the 80% use case to search all elements"? I can get behind that. I agree that it's definitely not a full solution, but I think it's probably good enough for a quick fix to those particular issues.
Committed and pushed to 8.x. Thanks!
Comment #8
damiankloip CreditAttribution: damiankloip commentedHmm, just hit an issue with a reference field (UI only) where I have to select bundles, I cannot E.g. just reference Nodes. I have to choose all bundles. I will always get a validation error in this case. That's not really that cool is it?
This seems to create more of a problem than the 'problem' being solved IMO.
Comment #9
dawehnerIts not cool at all.
What about adding 'All' as first option and convert that to
[]
which should totally work?Comment #10
BerdirAll could work, should be a new issue, though? ;)
Comment #11
amateescu CreditAttribution: amateescu commentedDiscussed with @damiankloip on IRC, we'll open a new issue to add a generic 'Select all' feature to the core checkboxes form element, mostly borrowed from Views UI :)
Comment #12
joscar CreditAttribution: joscar commentedIs the issue mentioned in #11 active? If so, where is it?