Can't edit group content due to Group 2 API change

Created on 25 August 2023, 10 months ago
Updated 30 August 2023, 10 months ago

Problem/Motivation

Using 2.0.0-alpha6 and attempted to edit a piece of content within a group. Got an error, and I pulled this from the log:

Error: Call to undefined method Drupal\group\Entity\GroupRelationship::getContentPlugin() in group_subscription_form_node_form_alter() (line 510 of /html/modules/contrib/group_subscription/group_subscription.module)

Looks like it's due to an update in Group. Line 510 of group_subscription.module is

$plugin = $group_content->getContentPlugin();

But should be:

$plugin = $group_content->getPlugin();

Steps to reproduce

1. Create a piece of content in a group.
2. Click "Edit" / attempt to edit the content.

Proposed resolution

Change $group_content->getContentPlugin(); to $group_content->getPlugin();

Remaining tasks

Create code / make an MR.

User interface changes

None

API changes

None

Data model changes

None

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States majorrobot

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

Comments & Activities

Production build 0.69.0 2024