doGetParticipants fails if reference item has null value

Created on 24 July 2025, 15 days ago

Problem/Motivation

Have an entity with an entity_reference field containing an item which does not reference an actual entity.
This leads to:

TypeError: Drupal\vgwort\FieldParticipantListBase::doGetParticipants(): Argument #1 ($entity) must be of type Drupal\Core\Entity\FieldableEntityInterface, null given, called in /var/www/html/docroot/modules/contrib/vgwort/src/Plugin/vgwort/ParticipantList/EntityReferenceField.php on line 28 in Drupal\vgwort\FieldParticipantListBase->doGetParticipants() (line 76 of modules/contrib/vgwort/src/FieldParticipantListBase.php).

Proposed resolution

Add check for referenced entity

πŸ› Bug report
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany volkerk

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024