Opened 12 years ago
Closed 12 years ago
#21274 closed defect (bug) (fixed)
Broken link for next comment pages for page on front
Reported by: | sirzooro | Owned by: | nacin |
---|---|---|---|
Milestone: | 3.5 | Priority: | normal |
Severity: | normal | Version: | 3.4.1 |
Component: | Rewrite Rules | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
Create page and configure WP do display it on front. Set Comments per page to some small value. Go to front page and add few comments - more than configured Comments per page, so WP will display only some of them and link leading to remaining ones (e.g. http://wp-beta.local/comment-page-1/#comments
). This link does not work - when you click it, browser will be redirected to following url, but page contents does not change:
http://wp-beta.local/?url=%2Fcomment-page-1%2F&ref=http%3A%2F%2Fwp-beta.local%2F%3Furl%3D%252Fcomment-page-1%252F%26ref%3Dhttp%253A%252F%252Fwp-beta.local%252F#comments
Note: permalink format is set to /%postname%/
Attachments (1)
Change History (7)
#2
@
12 years ago
OK, I retried to reproduce it, and this time I got a bit different result:
- Fresh WP 3.4.1 install (no plugins, default theme);
- set permalink format to /%postname%/, enabled breaking comments into pages and set it to 2, set default Sample page as Front page;
- go to front page;
- add 3 comments - after clicking Post Comment you will be redirected to 404 page, so use Back in browser;
- refresh page and click on Older Comments link - you will go to /comment-page-1/#comments URL and see the 404 page.
WordPress was installed on Windows/Apache - this may be important here.
#4
@
12 years ago
- Keywords has-patch added; needs-patch removed
- Milestone changed from Awaiting Review to 3.5
Thanks, I can reproduce now as well.
The problem is that rewrite rules are not flushed when setting a page as a front page, so the corresponding code in generate_rewrite_rules()
doesn't get executed:
http://core.trac.wordpress.org/browser/tags/3.4.1/wp-includes/rewrite.php#L1331
21274.patch fixes the issue by calling update_home_siteurl()
to flush the rules:
http://core.trac.wordpress.org/browser/tags/3.4.1/wp-admin/includes/misc.php#L194
I can't reproduce this following the steps provided the description. The URL I get is
http://trunk.wordpress/comment-page-1/#comments
, and it works fine.url
andref
parameters don't look like WP query variables. Could you try with all plugins disabled?