[wp-trac] [WordPress Trac] #59226: get_pages: post_modified_gmt value for sort_column/orderby silently dropped

WordPress Trac noreply at wordpress.org
Mon Aug 28 15:53:05 UTC 2023


#59226: get_pages: post_modified_gmt value for sort_column/orderby silently dropped
-------------------------------+-----------------------------
 Reporter:  david.binda        |      Owner:  (none)
     Type:  defect (bug)       |     Status:  new
 Priority:  normal             |  Milestone:  Awaiting Review
Component:  Posts, Post Types  |    Version:  6.3
 Severity:  normal             |   Keywords:
  Focuses:                     |
-------------------------------+-----------------------------
 With the refactoring of the `get_pages` function to internally use the
 `WP_Query` ( in r55569 ) the `post_modified_gmt` value for `sort_column`
 param (being translated to WP_Query's `orderby`) is no longer supported
 and as unsupported it gets silently dropped leading to different order of
 returned pages if used.

 While the backward incompatibility has been brought up in the original
 [https://core.trac.wordpress.org/ticket/12821#comment:41 ticket] it has
 not been addressed, not even mentioned in the related
 [https://make.wordpress.org/core/2023/07/14/wp_query-used-internally-in-
 get_pages/ dev note].

 Shall the order by `post_modified_gmt` be backported to the new
 implementation?

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


More information about the wp-trac mailing list