Opened 14 years ago
Closed 14 years ago
#16002 closed defect (bug) (fixed)
Static homepage not displaying as expected in 3.1-RC1
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 3.1 | Priority: | normal |
Severity: | normal | Version: | 3.1 |
Component: | General | Keywords: | needs-patch |
Focuses: | Cc: |
Description
I've noticed that if I set a static page as my homepage in 3.1-RC1, the page does not display as the site's front page. Instead the blog page is shown. If I revert to 3.03, the static homepage displays as expected.
I've tried this in two themes, including the copy of Twenty Ten bundled with 3.1-RC1, and the behaviour is identical in both.
There are a number of posts on the issue on the support forums here: http://wordpress.org/support/topic/static-home-page-not-showing-31
The problem seems to be related to the permalink structure used. I've been doing some experimenting and this is the behaviour I've noticed so far:
If I use the default permalink structure (or any of the preset options), the problem disappears and the static homepage works as expected.
If I set a custom permalink structure with the format /%postname%/ or /%category%/%postname%/ the problem reappears.
If I set a custom permalink structure with the format /articles/%postname%/ the problem disappears.
It seems that including a static element in the custom permalink solves the problem, whatever it is.
Attachments (4)
Change History (17)
#6
@
14 years ago
Tested 16002.diff locally and it works using each configuration of permalinks plus custom /%postname% and /%postname%/
#7
@
14 years ago
We need to find where the regression happened. That block of code is identical to 3.0.
#11
follow-up:
↓ 12
@
14 years ago
It would be interesting to see what the matched_rule var in the WP class is set to. There shouldn't usually be a matched rule.
I was able to reproduce on a clean 3.1-RC1 install by manipulating Permalinks, Reading and custom template settings. Can't do it again on the second install, though. However I've managed to debug the issue on the first one.
This condition in
query.php
is not satisifed:$_query
isArray ( [page] => [pagename] => )
,array_diff()
returnsArray ( [1] => pagename )
.I've made two patches both of which solve the problem for me. Not sure which one is more correct (if any).