The module overrides custom entity reference field item list classes

Created on 16 January 2023, almost 2 years ago
Updated 17 January 2023, almost 2 years ago

Problem/Motivation

The module doesn't only override field item list classes extending Drupal\Core\Field\EntityReferenceFieldItemList, but also field item classes extending Drupal\Core\Field\EntityReferenceFieldItemList. This causes certain logic to not be executed. Some examples:

  • Drupal\token\MenuLinkFieldItemList
  • Drupal\file\Plugin\Field\FieldType\FileFieldItemList

Proposed resolution

Only override the field item list if the class is Drupal\Core\Field\EntityReferenceFieldItemList, not if it's a class extending it. We could move any overridden methods to a trait and add subclasses for the above mentioned field item list classes. We could log a notice if we encounter a subclass that isn't covered by the module.

🐛 Bug report
Status

Closed: works as designed

Version

3.0

Component

Code

Created by

🇧🇪Belgium dieterholvoet Brussels

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.

  • Status changed to Closed: works as designed almost 2 years ago
Production build 0.71.5 2024