[wp-trac] [WordPress Trac] #39280: comment permalink wrong in WordPress 4.7

WordPress Trac noreply at wordpress.org
Thu Dec 15 20:22:37 UTC 2016


#39280: comment permalink wrong in WordPress 4.7
------------------------------------------+--------------------
 Reporter:  jikamens                      |       Owner:
     Type:  defect (bug)                  |      Status:  new
 Priority:  normal                        |   Milestone:  4.7.1
Component:  Comments                      |     Version:  4.7
 Severity:  normal                        |  Resolution:
 Keywords:  needs-patch needs-unit-tests  |     Focuses:
------------------------------------------+--------------------

Comment (by boonebgorges):

 The problem stems from [38740] #31101. Looking more closely, the fix in
 that ticket was incorrect for, I think, two different reasons.

 1. The "bug" identified in the ticket wasn't actually a bug. The `Comments
 should be displayed with the [oldest|newest] comments at the top of each
 page` setting has nothing to do with pagination. It only has to do with
 how comments are sorted on a specific page of results. I believe that the
 ticket should've been closed as invalid.
 2. The expected behavior described in the test introduced in [38740] is
 incorrect. The page of a comment (`comment-page-x`) does *not* depend on
 either the 'comment_order' or 'default_comment_page' options. The comment
 pagination system is designed in such a way that pagination-based URLs are
 "permalinks" (though not quite - see #34106). The 'default_comment_page'
 setting works by flipping the order in which pages appear, *not* the
 content of those pages. Consider a post with 10 pages of comments. When
 'default_comment_page' is set to 'last' (option value `newest`), the first
 comment page is the post URL and is equivalent to page 10; hitting "Older
 comments" takes you to comment-page-9.

 I believe the proper fix is simply a revert of [38740]. @rachelbaker
 @johnbillion Could I get a couple sanity checks on this, since we got it
 wrong last time? I will take the blame for the previous error, but I don't
 want to make it twice.

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


More information about the wp-trac mailing list