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 | 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)
Change History (8)
#3
@
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
@
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?
Note: See
TracTickets for help on using
tickets.
Attached patch adds a single extra rule:
(Just after the other root rules, eg:
)
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)