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
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | after-patch.png | 199.68 KB | arisen |
| #4 | before-patch.png | 512.06 KB | arisen |
Issue fork groupmedia-3354258
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
alecsmrekar commentedComment #4
arisenReviewed the MR and applied the patch. The patch applies cleanly.
The error is gone after applying the patch. Attached the screenshots.
Comment #8
lobsterr commentedThank you for your contribution, I will tag a new release