[wp-trac] [WordPress Trac] #31101: get_page_of_comment returns wrong page if comments are ordered with newest first
WordPress Trac
noreply at wordpress.org
Fri Sep 23 01:36:25 UTC 2016
#31101: get_page_of_comment returns wrong page if comments are ordered with newest
first
-------------------------------------+------------------
Reporter: pajtai | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.7
Component: Comments | Version: 4.1
Severity: normal | Resolution:
Keywords: has-patch needs-testing | Focuses:
-------------------------------------+------------------
Changes (by boonebgorges):
* keywords: has-patch dev-feedback => has-patch needs-testing
* milestone: Awaiting Review => 4.7
Comment:
It appears to me that 'comment_order' has never been considered in
`get_page_of_comment()`, even before the pagination rewrite in 4.4. As far
as I can see, this is an oversight. The oversight can probably be
explained by the fact that `get_page_of_comment()` is only used in core in
`get_comment_link()`, and in that case only when the page of the comment
can't be inferred by context. So the bug would rear its head rarely.
[attachment:31101.diff] adds the necessary logic, and it appears to fix
the bug in my testing. Can others confirm?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31101#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list