[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:40:52 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):
> 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.
Reviewing the list table code, I see this won't work: it expects `orderby`
to be lower case and even explicitly converts it to lower case if it
wasn't already. I think the JavaScript solution you proposed is likely the
best fix.
@trivedikavit - Can you review the feedback from @sabernhardt above to
review the additional locations that might need adjusting as well.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64467#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list