[wp-trac] [WordPress Trac] #64073: Attachments REST API: extend to support ordering by `mime_type`.

WordPress Trac noreply at wordpress.org
Mon Oct 20 02:22:14 UTC 2025


#64073: Attachments REST API: extend to support ordering by `mime_type`.
--------------------------------------+------------------------------
 Reporter:  ramonopoly                |       Owner:  (none)
     Type:  enhancement               |      Status:  new
 Priority:  normal                    |   Milestone:  Awaiting Review
Component:  REST API                  |     Version:  trunk
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:  rest-api
--------------------------------------+------------------------------

Comment (by ramonopoly):

 > I'm totally failing to find this ticket. But WP_Query has an issue where
 doing an order by by a non-unique field results in posts being returned in
 an unpredictable order. That means, as a user paginates over the query,
 they may end up not seeing all posts and instead see duplicates depending
 on how MySQL decides to order posts with the same mime_type.


 Seems like this bug, or a version of it, has existed for more than 17
 years

 https://core.trac.wordpress.org/ticket/8107

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/64073#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list