media_library Support

Created on 2 September 2025, 19 days ago

Problem/Motivation

Working with the media_library will fail, when using Open Social themes (socialbase, socialblue)

Steps to reproduce

Enable media and media_library module in your project to extend your current Open Social distribution.
Add a media field f.e. to a node-type, with using the Media library widget on your form display.
Create a new node of this type and try to add a media file to it.
You will be able to add a new file to your media library within the related Pop-Up/Modal-window, but you are not able to copy the selected media element "down" to your node create or edit form.

Proposed resolution

After spending a few hours to find the reason why, the answer was the views-view-unformatted.html.twig template in socialbase, which overwrites the original views-view-unformatted.html.twig from the views module.

Adding a views-view-unformatted--media-library--page.html.twig (attached, only zipped due to upload restrictions) template to the socialbase/templates/views folder with the original code from the views module solves the issue.

I know, that media and media_library are not used in the standard, but maybe a lot of people try to extend OS with these modules, adding this template to socialbase will not have any influence on OS, but can keep others from getting a lot of grey hair when trying to use the media_library ...

Feature request
Status

Active

Version

13.0

Component

Front-End

Created by

🇩🇪Germany slowflyer

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

Comments & Activities

Production build 0.71.5 2024