Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Usage Milestone: Google Analytics Module google_analytics crossed 1,000 active installs. Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Release: GraphQL Compose Codegen 1.1.2 Minor update available for module graphql_compose_codegen (1.1.2). Release: Mapy.com 1.1.3 Minor update available for module mapycom (1.1.3). Release: Ckeditor5 entity browser 3.0.3 Minor update available for module ckeditor5_entity_browser (3.0.3). Release: Ckeditor5 entity browser 3.0.1 Minor update available for module ckeditor5_entity_browser (3.0.1). Release: Ckeditor5 entity browser 3.0.2 Minor update available for module ckeditor5_entity_browser (3.0.2). Release: Teamleader Integration 4.0.2 Minor update available for module teamleader (4.0.2). Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Entity Reference Tweaks module

142 sites Security covered Drupal 10–11
View on drupal.org

This module enhances Drupal's core entity reference fields for the Open Y installation profile, allowing for dependencies in configuration to be stored but skipped during installation. This is particularly useful for large distributions to manage complex dependencies. It provides custom entity reference selection handlers and a migration process for existing fields.

πŸ‡ΊπŸ‡¦

This module is maintained by Ukrainian developers.
Please consider supporting Ukraine in a fight for their freedom and safety of Europe.

The idea of the module is to provide enhancements to the Core entity reference fields in the Open Y installation profile.

Long story short - when you need to keep dependencies in configs, but not making configs failing if dependency is not in place - use this module. It'll store dependencies but allow them to be skipped during installation.

Very useful for large distributions when fighting with dependency hell.

Entity Reference Selection Handler plugins

The plugins stored at src/Plugin/EntityReferenceSelection must be used in ER-fields if additional bundle filtering is setup and you export configuration of those fields into the profile.

Default Selection Handlers put dependency for each single bundle setup there, because the core works the way, that 'target_bundles' field settings entries add dependencies. See EntityReferenceItem::calculateDependencies().

DefaultSelectionNoDependency is basically needed to create a label for the group of Open Y selection handlers.

SelectionNoDependecyTrait is useful for inheriting from existing entity type specific selection handlers (see NodeSelectionNoDependency implementation as example).
See Traits Precendence section to understand how PHP handles method overrides when traits are used.

Migrating from core selection handlers to Open Y selection handlers

  • Go to the required entity refrence field configuration page that is provided by Field UI
  • Find "REFERENCE TYPE" section that contains "Reference method" field and a set of checkboxes for bundles limiting
  • Memorize the set of the selected bundles
  • Update "Reference method" value from 'Default' to 'Default (Open Y)'
  • Restore the state of the checkboxes (it can be named 'Content types' for nodes, or just 'Bundles' for other entity types)
  • Submit the form
  • Export the config (or the whole feature)
  • Verify field config doesn't contain dependencies to the bundle configs
  • Make sure the module now depends on openy_er module

Depends on

Dependencies of the latest stable release

  • field Drupal core
  • plugin Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
May 2025
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 1
Maintenance
Dormant

Releases

Version Type Core Release date
1.1.1 Stable 10–11 May 1, 2025