Make WordPress Core

Opened 15 years ago

Closed 15 years ago

#8598 closed defect (bug) (fixed)

When a Static page is set as the front page, Comment paging doesnt work.

Reported by: dd32's profile DD32 Owned by:
Milestone: 2.8 Priority: normal
Severity: major Version: 2.7
Component: Comments Keywords: has-patch tested commit
Focuses: Cc:

Description

As reported by Malaiac here: http://trac.wordpress.org/ticket/8398#comment:3 Comment paging links do not work on static home pages.

Looking at the rewrite rules, It seems that the Bitmask for the homepage isnt set to allow for posts/pages on the front page..

portfolio/[0-9]+/[^/]+/attachment/([^/]+)/comment-page-([0-9]{1,})/?$ => index.php?attachment=$matches[1]&cpage=$matches[2]
portfolio/([0-9]+)/([^/]+)/comment-page-([0-9]{1,})/?$ => index.php?p=$matches[1]&name=$matches[2]&cpage=$matches[3]
portfolio/[0-9]+/[^/]+/([^/]+)/comment-page-([0-9]{1,})/?$ => index.php?attachment=$matches[1]&cpage=$matches[2]
portfolio/[0-9]+/attachment/([^/]+)/comment-page-([0-9]{1,})/?$ => index.php?attachment=$matches[1]&cpage=$matches[2]
portfolio/([0-9]+)/comment-page-([0-9]{1,})/?$ => index.php?p=$matches[1]&cpage=$matches[2]
portfolio/[0-9]+/([^/]+)/comment-page-([0-9]{1,})/?$ => index.php?attachment=$matches[1]&cpage=$matches[2]
.+?/attachment/([^/]+)/comment-page-([0-9]{1,})/?$ => index.php?attachment=$matches[1]&cpage=$matches[2]
(.+?)/comment-page-([0-9]{1,})/?$ => index.php?pagename=$matches[1]&cpage=$matches[2]

(Thats a permalink structure of /portfolio/%post_id%/%postname%)

Attachments (1)

8598.diff (1.2 KB) - added by DD32 15 years ago.

Download all attachments as: .zip

Change History (8)

@DD32
15 years ago

#1 @DD32
15 years ago

  • Keywords has-patch needs-testing added; needs-patch removed

Attached patch adds a single extra rule:

'comment-page-([0-9]{1,})/?$' => string 'index.php?&page_id=124&cpage=$matches[1]' (length=40)

(Just after the other root rules, eg:

'page/?([0-9]{1,})/?$' => string 'index.php?&paged=$matches[1]' (length=28)

)

Since the pageID is hard-coded in the rule (Only way i could see to get it working, Passing a pagename=/ doesnt affect anything, and just passing the comment page directs it to the blog posts view)

I assume a add_action('update_option-page_on_front', array(&$wp_rewrite, 'flush_rules'); to default-filters.php would fix that (But since i've allready posted the patch, i'll not update it quite yet pending testing)

#2 @DD32
15 years ago

Any traction?

#3 @Denis-de-Bernardy
15 years ago

apparently not :-)

Personally, I resolved to adding a filter, as in if is_front_page() then add_filter(option_page_commments, false).

#4 @Denis-de-Bernardy
15 years ago

  • Keywords tested added; needs-testing removed
  • Milestone changed from 2.7.2 to 2.8
  • Severity changed from normal to major

works fine. on a separate note, why is there no comments template on pages in kubrick?

#5 @DD32
15 years ago

on a separate note, why is there no comments template on pages in kubrick?

Thats better in a different ticket. Quite simply: Because as a design choice, it was decided that most would not want comments on a page at the time. Remember, kubrick is many generations of web old.

#6 @Denis-de-Bernardy
15 years ago

  • Keywords commit added

#7 @ryan
15 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [11419]) Fix comment paging for static front page. Props DD32. fixes #8598

Note: See TracTickets for help on using tickets.