Make WordPress Core

Opened 2 months ago

Last modified 9 days ago

#61057 assigned defect (bug)

Media Library not showing new uploads when filtering by date

Reported by: vertisoft's profile vertisoft Owned by: antpb's profile antpb
Milestone: 6.7 Priority: normal
Severity: normal Version: 6.5
Component: Media Keywords: needs-patch
Focuses: Cc:

Description

Description

The issue can be reproduced in the media library, in grid mode. As soon as the value of the date filter is modified, new uploads will not be displayed in the grid until the user refreshes the page or modifies the date filter.

This issue appears to be similar to: https://core.trac.wordpress.org/ticket/50025

Environment

  • WordPress: 6.5.3-alpha-58036
  • PHP: 8.2.18
  • Server: Apache
  • Database: mysqli (Server: 5.7.44 / Client: mysqlnd 8.2.18)
  • Browser: Chrome 124.0.0.0 (Windows 10/11)
  • Theme: Twenty Twenty-Four 1.1
  • MU-Plugins: Aucune activée
  • Plugins:
    • WordPress Beta Tester 3.5.5

Steps to Reproduce

  1. Use grid mode in Media Library
  2. Filter by a date (eg. April 2024)
  3. Toggle back to "All Dates"
  4. Upload a media by drag-and-dropping an image into the grid

The new image will not appear in the grid unless I refresh the page or select the current date in the date filter (eg. April 2024)

Expected Results

There should be some visual feedback when uploading the media. Normally, the image should appear in the grid, and it should display a loading bar while it is being uploaded.

Actual Results

There is no visual feedback when uploading the media. The image does not appear in the grid at all, unless I refresh the page or filter the grid by the current date.

Attachments (5)

Step 1.png (15.0 KB) - added by vertisoft 2 months ago.
Step 2.png (18.2 KB) - added by vertisoft 2 months ago.
Step 3.png (19.4 KB) - added by vertisoft 2 months ago.
Step 4.png (28.4 KB) - added by vertisoft 2 months ago.
Step 5.png (23.5 KB) - added by vertisoft 2 months ago.

Download all attachments as: .zip

Change History (10)

@vertisoft
2 months ago

@vertisoft
2 months ago

@vertisoft
2 months ago

@vertisoft
2 months ago

@vertisoft
2 months ago

This ticket was mentioned in Slack in #core-media by antpb. View the logs.


7 weeks ago

#2 @antpb
7 weeks ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 6.6
  • Owner set to antpb
  • Status changed from new to assigned

This relates a bit to the work happening in https://core.trac.wordpress.org/ticket/54091

I'm going to look into if this can be solved alongside it. Moving to 6.6 to investigate.

A potential partial solution mentioned by @joedolson was that we could maybe solve this for most people by initializing if the current pagination count is less than 81 items. In that case, we could reinitialize the collection safely.

This ticket was mentioned in Slack in #core-media by antpb. View the logs.


2 weeks ago

#4 @antpb
2 weeks ago

  • Milestone changed from 6.6 to 6.7

As the other related issue has been punted to 6.7 we're going to need to do the same here. Moving to 6.7 to allow more time

#5 @dorshiff
9 days ago

I'm working on it as part of the contributor day.

Note: See TracTickets for help on using tickets.