[wp-trac] [WordPress Trac] #31846: Using the browser's Back and Forward buttons doesn't update the media library

WordPress Trac noreply at wordpress.org
Wed Apr 1 19:12:21 UTC 2015


#31846: Using the browser's Back and Forward buttons doesn't update the media
library
--------------------------+-----------------------------
 Reporter:  Faison        |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Media         |    Version:  4.0
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 In the Media Library (grid view), there's some backbone router magic going
 on to update the URL as you do things like click on an image to bring up
 the attachment details modal, or close the attachment details modal.
 Today, I noticed that after I open the attachment details for an image, I
 can press the browser's "back" button and the URL updates, but the
 attachment details are still visible.

 '''How to reproduce'''

 * Log into WordPress and go to the Media Library
 * Ensure that you're looking at the grid view
 * Click on an image to bring up the "Attachment Details" modal and notice
 that the URL updates to something like 'example.com/wp-
 admin/upload.php?item=1'
 * Click your browser's "Back" button and notice that the URL updates to
 something like 'example.com/wp-admin/upload.php', but the "Attachment
 Details" modal is still on the screen.

 I tested this in a fresh install for versions 4.0, 4.1.1, and trunk (a
 week old at most) in Chrome, Chromium and Firefox.

 I'd love to provide a patch, BUT I barely understand enough of the code to
 follow how the media grid is created.

 One Additional Note: After following the instructions listed above, click
 the browser's "Forward" button so that the URL returns to something like
 'example.com/wp-admin/upload.php?item=1', and you'll get the following
 error in Chrome/Chromium's Dev console:

 `Uncaught TypeError: Cannot read property 'findWhere' of undefined --
 media-grid.js?ver=4.1.1:335`

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


More information about the wp-trac mailing list