[wp-trac] [WordPress Trac] #30583: Switching Media Library Views Clears Search Query

WordPress Trac noreply at wordpress.org
Tue Dec 2 23:20:34 UTC 2014


#30583: Switching Media Library Views Clears Search Query
--------------------------+-----------------------------
 Reporter:  mrwweb        |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Media         |    Version:  4.0.1
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 When switching from Grid to List view or List to Grid view in the media
 library while looking at search results, the search query is either lost
 or ignored. The results I'm seeing are quite inconsistent even in what
 goes wrong.

 == Theme & Variations on a Bug ==

 === Grid -> List ===
 1. Open Media Library in Grid View
 2. Do a search.
 3. Switch to list view.
 '''Result:''' Search is lost. List view shows all items in media library.
 URL: `/wp-admin/upload.php?mode=list`

 === List -> Grid ===
 1. Open Media Library in List View
 2. Do a search.
 3. Switch to grid view.
 '''Result:''' Search is lost. Grid view shows all items in media library.
 URL: `/wp-admin/upload.php?mode=grid&attachment-
 filter&m=0&filter_action=Filter&s={SEARCH_TERM}&action=-1&paged=1&action2=-1&affected&_ajax_nonce=XXXXXXX`

 === Where Things Get Weird: Adding Vars to URL ===
 1. Open Media Library in Grid View
 2. Manually append `?s={SEARCH_TERM}` to URL. Hit `RETURN`.
 '''Result A:''' Page reloads showing all items. Not search.
 3. Switch to Grid View.
 '''Result B:''' Page loads in grid view with the search applied. What!?
 `URL:/wp-admin/upload.php?s=koala&mode=list`

 I think I've seen some other weird variations of these things, but those
 are the three that I can consistently reproduce.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/30583>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list