[wp-trac] [WordPress Trac] #13939: get_page_of_comment returns wrong page number when changing threading level
WordPress Trac
wp-trac at lists.automattic.com
Thu Jun 17 10:53:22 UTC 2010
#13939: get_page_of_comment returns wrong page number when changing threading level
--------------------------+-------------------------------------------------
Reporter: laceous | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.0.1
Component: Comments | Version: 3.0
Severity: normal | Keywords: has-patch needs-testing
--------------------------+-------------------------------------------------
Changes (by laceous):
* keywords: => has-patch needs-testing
* milestone: 3.1 => 3.0.1
Comment:
I think in the example above I was running into two different issues in
this function. To repro the issue I was initially reporting you'd
actually need to add a few more sub-replies under "comment-5."
I changed get_query_var('comments_per_page') to
get_option('comments_per_page') because the first wasn't returning
anything. I may have been calling this function before the query_vars are
populated. If query_vars are important here, then maybe we can try that
first and then fall back to get_option?
I also tweaked the SQL in the case that threading isn't enabled.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/13939#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list