Media Library widget display doesn't return to first page on applying filters

Created on 31 March 2022, over 2 years ago
Updated 1 May 2024, 8 months ago

Problem/Motivation

In the media library widget, if you navigate in the pager, type something in the Name search, and click Apply filters, the pager will stay on the same page. This can lead to issues, such as no media items showing if there aren't any search results past the current page.

This issue only seems to exist in the widget and widget_table displays. The Media Library page returns to the first page on search.

Steps to reproduce

  1. Enable Media Library module
  2. Add a media field to a content type, under Manage form display set widget to Media library
  3. Add or edit a node for that content type, for that media field click Add media to open the media library
  4. Below the media entities, click right on the pager
  5. Type something in the Name search, click Apply filters
  6. The pager will stay on the same page, sometimes showing no media entities depending on the search

Proposed resolution

Return to first page when Apply filters is clicked. Or, if this is the result of a bug in the media_library module code, search for the origin of the problem.

Remaining tasks

Create a patch for drupal/core.

User interface changes

None.

API changes

None.

Data model changes

None.

πŸ› Bug report
Status

Fixed

Version

10.3 ✨

Component
MediaΒ  β†’

Last updated 3 days ago

Created by

πŸ‡ΊπŸ‡ΈUnited States kelly.m.jacobs

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

Merge Requests

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