Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 295783

Media Library views fail to reset pager when filters are applied

$
0
0

Problem/Motivation

When interacting with exposed filters in the Media Library you can get "no results" even when there are valid results, just because the pager does not get reset.

Steps to reproduce

  • Set up a site with the Media Library module enabled and configured for a text format. The Umami demo works great for this.
  • Create enough media items such that they will overflow onto more than one page of results in the media embed modal.
  • Open the media embed modal from a rich text area and page to "page 2" of media results.
  • Search for text that appears only in a small subset of your media items (a small enough subset such that the result set is smaller than one page of results).
  • You'll receive the message "No media available." despite the fact that there is, in fact, media that matches your search term.

This happens because the view still has you on page 2 of the results, and there aren't enough results to flow onto a second page. The pager doesn't even display to give you a clue that this has happened.

Proposed resolution

Reset the pager any time the user interacts with the exposed filters.


Viewing all articles
Browse latest Browse all 295783


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>