Make WordPress Core

Opened 14 years ago

Closed 14 years ago

#13009 closed defect (bug) (fixed)

When inheriting twentyten's comments.php, theme breaks.

Reported by: ptahdunbar's profile ptahdunbar Owned by: westi's profile westi
Milestone: 3.0 Priority: high
Severity: normal Version: 3.0
Component: Template Keywords: has-patch
Focuses: Cc:

Description

If a theme has no comments.php file, WP falls back to twentyten's comments.php file.

This breaks the theme because twentyten requires twentyten_comment() (defined in functions.php) which isn't loaded, causing a fatal error.

Patch moves twentyten_comment() from functions.php into the top of comments.php. Fixes fatal error.

Attachments (1)

twentyten_comments.diff (4.2 KB) - added by ptahdunbar 14 years ago.

Download all attachments as: .zip

Change History (5)

#1 @nacin
14 years ago

  • Priority changed from normal to high

We're going to have this same issue with header.php.

#2 @westi
14 years ago

I wonder if it would not be better to do away with the fallback and do the following on upgrade:

1) Check for themes relying on the fallback and copy header/footer/comments over to the theme from default
2) Remove the fallback code
3) Publicise that these files are required in a theme

We could also consider a special 'fallback' theme which just contains the files we fallback too and nothing else so can't be a parent theme

#3 @westi
14 years ago

  • Owner set to westi
  • Status changed from new to accepted

Working on a solution to this as well as #12425

#4 @westi
14 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

(In [14365]) First pass of compatibility code for old themes which relied on using templates from the default theme without expressly identifying it as the parent theme.
Fixes #12425 and #13009.
The fallback to these template files is now depreceated and will be removed in a future version.

Note: See TracTickets for help on using tickets.