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.

CommentFileSizeAuthor
#1 1953444.patch2.28 KBamateescu
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

amateescu’s picture

Status: Active » Needs review
FileSize
2.28 KB
xjm’s picture

Status: Needs review » Reviewed & tested by the community

So, 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!

xjm’s picture

xjm’s picture

Title: Users can easily skip the 'target bundles' section from the Entity reference instance settings form » Make 'target bundles' required on the the Entity reference instance settings form
xjm’s picture

Issue tags: +Quick fix
webchick’s picture

Title: Make 'target bundles' required on the the Entity reference instance settings form » Make 'target bundles' required on the Entity reference instance settings form
Status: Reviewed & tested by the community » Fixed

Ok, 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!

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

damiankloip’s picture

Issue summary: View changes
Status: Closed (fixed) » Active

Hmm, 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.

dawehner’s picture

Its not cool at all.
What about adding 'All' as first option and convert that to [] which should totally work?

Berdir’s picture

All could work, should be a new issue, though? ;)

amateescu’s picture

Status: Active » Closed (fixed)

Discussed 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 :)

joscar’s picture

Is the issue mentioned in #11 active? If so, where is it?