Media Library not working with ajax requests

Created on 30 March 2021, over 4 years ago
Updated 23 July 2025, 3 months ago

Problem/Motivation

When I am using media library and picking my images. The interface looks nice at the first load. But when using the pager (which is not styled but that's another issue), the style is completely broken after changing page.

I found out that it is when using 'views.ajax' and there is some code for it in the module but that's not working for me.
My theme is based on stable so I have very little suggestions and the test that is used is probably not compatible with the stable theme from core.

in_array('views_view__media_library', $suggestions)

I did a patch that fixes partially the issue for me. At least some of the suggestions are called now, I have a grid now and the borders of the cards are showing and the checkbox is there. The issue I still have is that the image is not taking the whole width of the card. I need to look further for that problem.

Sorry I didn't show the whole modal because I have images I cannot show in the library.

Steps to reproduce

Proposed resolution

Change the way the suggestion is added for view.ajax

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇨🇦Canada phjou Vancouver 🇨🇦 🇪🇺

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024