Error: Call to undefined method Drupal\group\Entity\GroupRelationship::getContentPlugin() in Drupal\entitygroupfield\Plugin\Field\FieldWidget\EntityGroupFieldWidgetBase->formElement() (line 249 of modules/contrib/entitygroupfield/src/Plugin/Field/FieldWid

Created on 7 January 2024, 12 months ago
Updated 10 June 2024, 7 months ago

Problem/Motivation

When a keys doesn't not exist, a method for group module v1 is executed. When using group module v2, this is an issue.

Error: Call to undefined method Drupal\group\Entity\GroupRelationship::getContentPlugin() in Drupal\entitygroupfield\Plugin\Field\FieldWidget\EntityGroupFieldWidgetBase->formElement() (line 249 of modules/contrib/entitygroupfield/src/Plugin/Field/FieldWidget/EntityGroupFieldWidgetBase.php).

See this link for the proper conversion method:
https://www.drupal.org/docs/extending-drupal/contributed-modules/contrib... β†’

Steps to reproduce

A simple unset of the tested var key while visiting a node using the group field will cause the ternary else statement to execute showing a WSOD error.

Proposed resolution

Patch supplied

πŸ› Bug report
Status

Needs review

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States peachez

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

Comments & Activities

Production build 0.71.5 2024