[wp-trac] [WordPress Trac] #64467: Grid view displays attachments in the wrong order when an order query var is present but not normalized
WordPress Trac
noreply at wordpress.org
Fri Jan 2 17:23:02 UTC 2026
#64467: Grid view displays attachments in the wrong order when an order query var
is present but not normalized
-----------------------------+-----------------------------------------
Reporter: trivedikavit | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version:
Severity: minor | Resolution:
Keywords: has-screenshots | Focuses: javascript, administration
-----------------------------+-----------------------------------------
Comment (by adamsilverstein):
@trivedikavit Thanks for the detailed bug report! I was able to reproduce
this in trunk following the common path you described:
> Visit List mode with sorting: /wp-
admin/upload.php?mode=list&orderby=date&order=desc
> Click the Grid view toggle (the generated link preserves orderby/order).
> Grid view renders the first batch of attachments in the wrong order.
Since is the primary or maybe only way users can reach this mis-sorted
state (there is no sort option on the grid view itself). I wonder if a
simpler fix might be to just change the sort parameter used on the list
view from 'desc' to 'DESC'. This seems like the fundamental issue - the
sort variable doesn't match what the code is expecting.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64467#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list