Opened 16 years ago
Closed 12 years ago
#15513 closed defect (bug) (wontfix)
Home Page fails to use page template sometimes
| Reported by: | filosofo | Owned by: | filosofo |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Themes | Version: | 3.1 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: | template |
Description
If a page is the home page but not also the front page and it has a page template, the page template is ignored. This behavior is counter-intuitive:
- When editing the home-page page, either normally or with quick edit, the page template is shown as being the template.
- When acting as a front page, a page uses its page template if available.
Attachments (1)
Change History (9)
#2
@
16 years ago
Don't know what it was exactly, but it seems to work all now by using the latest nightly (from 14-12-2010).. so my comment above can be ignored..
#5
@
16 years ago
- Keywords 3.2-early added
- Milestone 3.1 → Future Release
- Resolution fixed
- Status closed → reopened
#7
@
12 years ago
- Keywords close added; 3.2-early removed
Let's not do this. We can't assume all page templates run the loop in a way that displays post correctly.
With the patch applied, Twenty Fourteen activated, and the Contributor page template active on the page_for_posts, this is what happens: https://cloudup.com/cwLUMKHS1Ht
We also still haven't figured out a way to avoid #15945.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
I've the same problem here, but this solution seems not to work for me.
I've tried to debug it a bit as far as I could and I found that on line 1415/1416 of query.php it's going wrong.
On a "working" install the $_query is empty when you have a page template as homepage. If it's not empty it should have the array keys that are in the if-statement.
However on the install where it goes wrong, this is the content (print_r) of the $_query array:
Array ( [page] => [pagename] => )Of course I can change the if statement, so it will also match these two keys, but I don;t feel that would be the right solution.
Anyone?