I am not sure the title is very descriptive but I have not found a better one.

I enabled the "Document" and "Image" plugins only for my group type. When I visit the group/[id]/media page, I have "Status" and "Media type" dropdowns for filtering. The "Media type" dropdown contains all the existing media types even if my group can only be associated with "Document" and "Image" media types.

CommentFileSizeAuthor
#13 3188566.patch637 byteszcht

Issue fork groupmedia-3188566

Command icon 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

vbouchet created an issue. See original summary.

a.dmitriiev’s picture

I will check how the filter could be restricted based on the enabled plugins.

vbouchet’s picture

Please note that I created the ticket here because I noticed it on the group/[id]/media page but the same apply to group/[id]/node (from group/modules/gnode module). Given it is a Views, I suspect it will be unnecessary complex to filter the list.

a.dmitriiev’s picture

There is already something similar in Lightning media browser called "Yield to media context" and there the view filter respects the media reference field settings, so it is displaying only the bundles that are allowed in the field settings. So this is sure possible and challenging ;)

LOBsTerr made their first commit to this issue’s fork.

  • LOBsTerr committed 18cb530e on 8.x-2.x
    Issue #3188566: Media type filter should only contains possible media...

  • LOBsTerr committed 3dec6f19 on 3.0.x
    Issue #3188566 by LOBsTerr: Media type filter should only contains...

  • LOBsTerr committed 13ee83d8 on 4.0.x
    Issue #3188566 by LOBsTerr: Media type filter should only contains...
lobsterr’s picture

Status: Active » Fixed
hernani’s picture

This broke release 2.0 as the the Group class was not imported to .module.

lobsterr’s picture

thanks, I will fix it soon, a lot of changes and three releases

zcht’s picture

StatusFileSize
new637 bytes

Have now actually needed it urgently, and already built its own patch... well watched @hernani, thank you

  • LOBsTerr committed 55e8fb79 on 8.x-2.x
    Issue #3188566: Add missing use statement.
    
lobsterr’s picture

A new release was tagged 8.x-2.1

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.