[wp-trac] [WordPress Trac] #42936: get_adjacent_post won't find any posts that are published in the same minute

WordPress Trac noreply at wordpress.org
Tue Oct 6 06:03:25 UTC 2020


#42936: get_adjacent_post won't find any posts that are published in the same
minute
----------------------------------------+---------------------
 Reporter:  sheepysheep60               |       Owner:  (none)
     Type:  defect (bug)                |      Status:  new
 Priority:  normal                      |   Milestone:  5.6
Component:  Posts, Post Types           |     Version:  4.9.1
 Severity:  normal                      |  Resolution:
 Keywords:  needs-patch good-first-bug  |     Focuses:
----------------------------------------+---------------------
Changes (by talldanwp):

 * keywords:   => needs-patch good-first-bug
 * component:  General => Posts, Post Types
 * milestone:  Awaiting Review => 5.6


Comment:

 Thanks for reporting @sheepysheep60. We discussed this during a triage
 session in slack
 (https://wordpress.slack.com/archives/C02RQBWTW/p1601963248296700) and
 agreed this looks like a bug, it was mentioned in the triage that the
 cause seems to be:

 > because get_adjacent_post uses WHERE p.post_date > $current_post_date?
 > Probably need to make it a >= and then ORDER BY p.post_date, p.ID

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


More information about the wp-trac mailing list