[wp-trac] [WordPress Trac] #29663: next_post_link & previous_post_link Category exclude broken

WordPress Trac noreply at wordpress.org
Mon Nov 3 20:59:24 UTC 2014


#29663: next_post_link & previous_post_link Category exclude broken
------------------------------------------------+--------------------------
 Reporter:  gabrieldiggs                        |       Owner:
     Type:  defect (bug)                        |  wonderboymusic
 Priority:  normal                              |      Status:  assigned
Component:  Posts, Post Types                   |   Milestone:  4.0.1
 Severity:  normal                              |     Version:  trunk
 Keywords:  reporter-feedback needs-unit-tests  |  Resolution:
                                                |     Focuses:  template
------------------------------------------------+--------------------------

Comment (by boonebgorges):

 MikeHansenMe - Thanks for working on tests for this. It's a bit hard to
 say with certainty without seeing your tests, but based on your "most of
 the time" comment, I'm guessing it's that the posts you're creating all
 have the same post_date. Look at the internals of `get_adjacent_post()` -
 they do a `<` or `>` check, and if the post_date is the same, it'll return
 nothing. When creating lots of items in a unit test, they'll usually have
 the same post_date, but sometimes won't if you happen to be spanning a
 second.

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


More information about the wp-trac mailing list