Opened 6 years ago
Last modified 6 weeks ago
#51492 new defect (bug)
Wrong order of comments when using numbered pagination
| Reported by: | askel45 | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Comments | Version: | 5.5.1 |
| Severity: | normal | Keywords: | close |
| Cc: | Focuses: |
Description
Using paginate_comments_links() to show numbered pagination in comments instead of 'older comments' or 'newer comments' causes a problem. When comments are broken into pages, with the last page and newer comments shown by default, the numbered pagination shows the current page as the last in the pagination. For example, if there are 60 comments broken down to 20 comments per page, the initial post-loading shows page 3 as the current page (instead of page 1) and a person has to navigate backwards to read other comments (page 2 then page 1).
Change History (2)
Note:
See TracTickets
for help on using tickets.
I investigated and tested this ticket on WordPress Trunk (
7.2-alpha-63166-src) to evaluate the behavior ofpaginate_comments_links().Observations
In Settings → Discussion, under the "Comment Pagination" section:
last page(orfirst page)last page(default_comments_page = 'newest'):paginate_comments_links()correctly marks Page 3 as the active page:first page(default_comments_page = 'oldest'):paginate_comments_links()marks Page 1 as the active page:Conclusion & Recommendation
This behavior is working as designed according to the core Discussion settings under Comment Pagination. If a site owner wants pagination to start on Page 1 by default, selecting
first pageachieves this without requiring core code changes.Since this ticket was opened against WordPress 5.5 and has seen no further reproduction issues over multiple major releases, I recommend closing this ticket as
worksforme.Removing
needs-testing,dev-feedback,2nd-opinionand adding theclosekeyword for maintainer review.