Make bundle optional in the default selection method of the entity reference field

Created on 12 July 2019, over 5 years ago
Updated 1 August 2023, over 1 year ago

Problem/Motivation

The default entity reference selection method requires to choose at least one bundle of the target entity type.

This adds the following limitations:

  1. It is not possible to create a new entity reference field (with the default selection method) to entity types with not yet configured bundles. See the related issue 🐛 Be more helpful if there's no bundle to choose from Needs work
  2. When a new bundle is created, site builders must review all entity reference fields to such entity type in order of adding the new bundle in the configuration.
  3. Modules that provides reference fields as part of their installation configuration must declare dependency on any other module that add one or more bundles on the target entity type.

I try to figure out why the bundle selection is required, but I didn't found a clear reason. Current implementation works for entity types that do not have support for bundles, so it should not be hard to add this feature.

Proposed resolution

Make the bundle setting optional. An option to select "all except" the selected bundles could also be useful.

Remaining tasks

TBD.

User interface changes

As described.

API changes

None.

Data model changes

None.

Release notes snippet

TBD.

Feature request
Status

Closed: duplicate

Version

11.0 🔥

Component
Field 

Last updated 1 day ago

Created by

🇪🇸Spain manuel.adan 🌌

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024