WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#8398 closed defect (bug) (worksforme)

Comment Pagination Bug

Reported by: alenonimo Owned by:
Milestone: Priority: high
Severity: major Version:
Component: Comments Keywords: needs-testing
Focuses: Cc:

Description

I was browsing my posts and found this bug.

When you have enough comments for pagination, the links for the other pages are created by adding "comment-page-2#comments" at the end of the page URL.

The problem occurs when your permalinks doesn't have the trailing slash "/" at the end.

Example:

If a page URL is
http://a-wordpress-blog.com/article/page-with-a-lot-of-comments

The pagination create links like
http://a-wordpress-blog.com/article/page-with-a-lot-of-commentscomment-page-2#comments

The correct would be
http://a-wordpress-blog.com/article/page-with-a-lot-of-comments/comment-page-2#comments

Change History (5)

comment:1 dberebi5 years ago

  • Keywords needs-testing added

Working with xampp on windows and WP-2.7-beta3-9909 I have no problem at all, my permalink is /%year%/%monthnum%/%day%/%postname%, only the correct urls generated

comment:2 ryan5 years ago

  • Milestone 2.7 deleted
  • Resolution set to worksforme
  • Status changed from new to closed

Working here too, and get_comment_link() looks correct. Re-open if this is still a problem with the latest 2.7 nightly.

comment:3 Malaiac5 years ago

  • Resolution worksforme deleted
  • Status changed from closed to reopened

similar bug here.

Create a page.
Set this page as home.
Load home.
Add a comment.
Ouch !
'http://mysite.com/comment-page-1#comment-7' = 'Page not found'

Everything else works fine, and everything works fine when comment pagination is off.

comment:4 Malaiac5 years ago

edit :
in the same situation, comment pagination does work for other posts/pages.
But I think it's the same issue between URL with no trailing slash and home (an URL with no path but the trailing slash)

comment:5 DD325 years ago

  • Resolution set to worksforme
  • Status changed from reopened to closed

Malaiac: It has nothing to do with the trailing slash, Its all to do with the fact that WordPress doesnt currently treat the homepage as a Post/Page page.

I created a new ticket to deal with it to prevent confusion with the description of this ticket: #8598 (When a Static page is set as the front page, Comment paging doesnt work.)

Note: See TracTickets for help on using tickets.