Make WordPress Core

Opened 14 years ago

Closed 14 years ago

#15945 closed defect (bug) (fixed)

Twenty Ten: Single column page template displays posts incorrectly when set as posts page in Reading Settings

Reported by: andrewspittle's profile andrewspittle Owned by:
Milestone: 3.1 Priority: normal
Severity: blocker Version: 3.1
Component: Themes Keywords:
Focuses: Cc:

Description

If a page is created using the "One column, no sidebar" template in Twenty Ten but is also set to be where posts display at Settings > Reading posts will appear but will be served from the loop-page.php loop instead of loop.php

Titles are not linked. Tags, categories, and comment links do not appear.

Tested in 3.1-beta2-17056

To reproduce...

  1. Create a new page titled "Blog" at Pages > Add New
  2. Set page to use the one column template in Twenty Ten
  3. Publish the page
  4. Go to Settings > Reading and set "Blog" to the posts page.
  5. View the "Blog" page

You should see something like the attached screenshot which displays a post with no link to the permalink and no category, date, or comment information.

Attachments (2)

Screen shot 2010-12-21 at 4.08.06 PM.png (193.0 KB) - added by andrewspittle 14 years ago.
15945.patch (499 bytes) - added by SergeyBiryukov 14 years ago.

Download all attachments as: .zip

Change History (17)

#1 @lancewillett
14 years ago

  • Cc lance@… added

When the page_for_posts setting is used, loop.php and index.php files should run. In this case, when the custom page template is set for page_for_posts, the custom page template runs and not index.php.

I was able to reproduce with another theme that uses a custom page template (Structure).

#2 @nacin
14 years ago

  • Milestone changed from Awaiting Review to 3.1
  • Severity changed from normal to blocker

#3 @nacin
14 years ago

Related not-yet-investigated regression I don't think there's a ticket for yet: http://wordpress.org/support/topic/static-home-page-not-showing-31

#4 @SergeyBiryukov
14 years ago

  • Keywords has-patch added

Nevermind the patch, I initially misread the description.

This was introduced in r16915 as a fix for #15513. Isn't it actually the intended behaviour? Seems reasonable to me. If I specify a custom template for a page, I'd expect it to be used no matter what.

Version 0, edited 14 years ago by SergeyBiryukov (next)

#5 @SergeyBiryukov
14 years ago

  • Keywords has-patch removed

#6 @filosofo
14 years ago

I'm not seeing the issue. Why would you set the home page to use that template if you don't want to use that template?

#7 @jane
14 years ago

I think the issue is that "template" covers both layout and element behavior. People want the no-sidebar layout, but still want links and timestamps etc on the blog posts. There's no user feedback that says putting the blog stream on a page will remove all the blog info. We either need an additional template that is no-sidebar blog page or we need to address the way it's handling putting a blog stream into a page template. If it's not a regression, though, I don't see this as a 3.1 issue.

#8 @andrewspittle
14 years ago

If it's not a regression, though, I don't see this as a 3.1 issue.

Meant to include that in the ticket. In 3.0.3 a one-column page set as the posts page will revert to the index.php template. The sidebar will display and all posts include links, timestaps, etc.

#9 follow-up: @nacin
14 years ago

Right, but.. then the page template setting was made erroneously.

I do see an issue with a flood of problems coming into the forums on this. Can we safely write an upgrade script to turn off page templates for the posts page?

#10 @filosofo
14 years ago

There's no user feedback that says putting the blog stream on a page will remove all the blog info.

I do see an issue with a flood of problems coming into the forums on this. Can we safely write an upgrade script to turn off page templates for the posts page?

The same behavior has been happening with the (non-home) front page for years, and it doesn't seem have caused too much confusion.

I agree that an easy solution would be to void page templates whenever a page is set to "home."

#11 in reply to: ↑ 9 @lancewillett
14 years ago

turn off page templates for the posts page?

+1 for this, it will help immensely with the confusion.

#12 @SergeyBiryukov
14 years ago

So r16915 needs to be reverted then? Or should we reset the template when a page is set as Home?

#13 @filosofo
14 years ago

r16915 should not be reverted. The issue of this ticket is a user error / UI issue, which would be better handled with reseting the template or something like that, not introducing inconsistent behavior for page templates.

#14 @nacin
14 years ago

Can we revert for 3.1 and handle this in a better way in 3.2?

#15 @nacin
14 years ago

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.