[wp-trac] [WordPress Trac] #52650: Media dialog throws away models in query cache and I get a blank media view

WordPress Trac noreply at wordpress.org
Thu Feb 25 08:35:55 UTC 2021


#52650: Media dialog throws away models in query cache and I get a blank media view
----------------------------+-----------------------------
 Reporter:  devowl          |      Owner:  (none)
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Media           |    Version:  5.6.2
 Severity:  major           |   Keywords:
  Focuses:  ui, javascript  |
----------------------------+-----------------------------
 Reprocedure as follows:

 1. Upload 3 images your media library
 1. Create a post and click "Set featured image"
 1. 3 files are visible
 1. Filter by "Date", e.g. select this month
 1. 3 files are visible
 1. Change filter back to "All dates"
 1. Close media dialog
 1. Click on "Set featured image" again (**do not reload the page!**)
 1. Filter by "Date" again and select the previously selected month
 1. **You will not get any images in the view**

 Reprocedure video:
 https://drive.google.com/file/d/1iT4Dve5fn8lxoChCPOWaajhs4FPQN2Yr/view

 Notes:

 - This issue is **not** related to Gutenberg because all media dialogs are
 affected
 - It also is not only related to the "Date" filter, the same issue can be
 reprocedured with all filters (e.g. "Unattached")
 - It is not related to any plugin because I have deactivated all plugins
 and themes (using default theme)
 - Not reprocedurable in WordPress 5.5 (tested on another customer
 installation)

 I could identify that the following line
 https://github.com/WordPress/WordPress/blob/dc3a76e8f325e05eca7534babf9e42cdc14bb5bd
 /wp-includes/js/media-models.js#L1376 shows a query cache without models
 `length=0` and `hasMore=false`.

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


More information about the wp-trac mailing list