WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 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 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 3 years ago.
15945.patch (499 bytes) - added by SergeyBiryukov 3 years ago.

Download all attachments as: .zip

Change History (17)

comment:1 lancewillett3 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).

comment:2 nacin3 years ago

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

comment:3 nacin3 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

SergeyBiryukov3 years ago

comment:4 SergeyBiryukov3 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 3 years ago by SergeyBiryukov (next)

comment:5 SergeyBiryukov3 years ago

  • Keywords has-patch removed

comment:6 filosofo3 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?

comment:7 jane3 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.

comment:8 andrewspittle3 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.

comment:9 follow-up: nacin3 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?

comment:10 filosofo3 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."

comment:11 in reply to: ↑ 9 lancewillett3 years ago

turn off page templates for the posts page?

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

comment:12 SergeyBiryukov3 years ago

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

comment:13 filosofo3 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.

comment:14 nacin3 years ago

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

comment:15 nacin3 years ago

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