Error when trying to add new media

Created on 14 April 2023, about 1 year ago
Updated 30 April 2023, about 1 year ago

Problem/Motivation

Adding new media via returns the following error:
Error: Cannot use object of type Drupal\group\Plugin\Group\Relation\GroupRelationType as array in groupmedia_group_relationship_create_access() (line 154 of modules/contrib/groupmedia/groupmedia.module).

Steps to reproduce

1. Fresh D10 install
2. Install group 3.x and groupmedia 4.x
3. Create a new group type
4. Enable the "Group media (Document)" group relationship at /admin/group/types/manage/{group_id}/content using default settings
5. Create a new group using default settings
6. Go to /group/1/media/add and notice the error

Proposed resolution

The plugin definition for a group relationship is not an array, it's an object, instance of GroupRelationTypeInterface. That should be taken into account in function groupmedia_group_relationship_create_access.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

4.0

Component

Code

Created by

🇸🇮Slovenia alecsmrekar

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

Comments & Activities

Production build 0.69.0 2024