Preserve Group Context in Gutenberg Editor

Created on 2 October 2023, about 1 year ago
Updated 15 November 2023, about 1 year ago

Problem/Motivation

Gutenberg Editor module is a block based editor that implements Drupal Media in a user-friendly drag-and-drop editor. When creating Group Nodes and use the Gutenberg editor, the Media library does not honour the Group context.

Steps to reproduce

1. Install Gutenberg module
2. Install and configure Group, GroupMedia, Group_Media_Library modules
3. Enable Gutenberg experience for a Group content type
4. Create a node of that content type within the Group
5. Using the "Image" block in the Gutenberg editor, click on "Media Library" and upload a file

Note that the media library from gutenberg will allow you to select any media, not just media belonging to group.

I'd appreciate any guidance on how to implement the APIs in this module to bring in group context for gutenberg. Any help is appreciated. I will also help fund this module if possible.

Feature request
Status

Fixed

Version

2.0

Component

User interface

Created by

🇨🇦Canada ydahi Waterloo, Canada

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

Comments & Activities

  • Issue created by @ydahi
  • 🇧🇪Belgium msnassar

    @ydahi This module doesn't prevent you from selecting media items that do not belong to the current group even when using the module with core's media library widget. For such functionality, I have already created another module Group Media Library Extra . The module should work out of the box if the media library in Gutenberg editor is aware of the group context. But this is not the case, because Group Media Library module doesn't support Gutenberg editor. It only supports the core's media library widget. To keep this module simple, I do not have a plan to support functionalities other than the ones that come with core.
    On the other hand, the media library in Gutenberg editor module is working differently than the one in core.
    If we want to support Gutenberg editor, I prefer to do it in new contrib module.

    I need some time to investigate how to bring in group context for gutenberg editor.
    BTW, Thanks for offering a fund. I really appreciate your help.

  • 🇨🇦Canada ydahi Waterloo, Canada

    Hi msnassar,

    Thanks for responding and for the clarifications.

    An ideal solution has these two features:

    1. I can only select media shared in the group when using Gutenberg editor.

    2. When I upload media using the Gutenberg editor, it is added to the Group that the node belongs to.

    Also, users can be associated with multiple groups.

    If you think this is feasible, I'll reach out via contact form to try and schedule some time with you to discuss funding a separate contrib module for this feature.

  • 🇧🇪Belgium msnassar

    Hello @ydahi

    Yes, I think this is feasible!

  • Status changed to Fixed about 1 year ago
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024