WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#15712 closed defect (bug) (fixed)

Broken child theme issue

Reported by: greuben Owned by: greuben
Milestone: 3.1 Priority: normal
Severity: normal Version: 3.1
Component: Themes Keywords: has-patch commit
Focuses: Cc:

Description

If a child theme is broken, validate_current_theme() function updates the "current_theme" option to "Twenty Ten" but does not update "stylesheet" and "template" options, which results in displaying the default theme as current theme in backend but the front end still refers to the broken child theme's files.

To check this issue:

1) Create a child theme for twentyten theme( or anyother ) and activate it

2) Delete the child theme's style.css or the theme folder manually

3) Check the front end.

Attachments (3)

broken_childtheme_fix.diff (3.4 KB) - added by greuben 5 years ago.
16760.diff (486 bytes) - added by greuben 5 years ago.
15712.diff (474 bytes) - added by greuben 5 years ago.
relative to trunk and proper formatting

Download all attachments as: .zip

Change History (13)

comment:1 @nacin5 years ago

  • Keywords has-patch added; broken child theme removed
  • Milestone changed from Awaiting Review to 3.1

comment:2 follow-up: @nacin5 years ago

I think for 3.1 we can probably just revert to the default theme. Patch looks like it does way too much honestly. Also, we use tabs not spaces, so that might be messing up with the formatting a bit.

@greuben5 years ago

comment:3 in reply to: ↑ 2 @greuben5 years ago

Replying to nacin:

I think for 3.1 we can probably just revert to the default theme. Patch looks like it does way too much honestly. Also, we use tabs not spaces, so that might be messing up with the formatting a bit.

Agreed, the first patch does way too much. Just thought reverting to parent theme would be nice. 1670.diff just reverts back to default theme.

comment:4 @greuben5 years ago

  • Cc rgunday@… added

Its 16760.diff not 1670. Typo days :(

comment:5 @nacin5 years ago

Looks fine. Should be trivial to add parent theme support but I don't find that to be particularly necessary at this time.

@greuben5 years ago

relative to trunk and proper formatting

comment:6 @nacin5 years ago

  • Keywords commit added

Looks good.

comment:7 @nacin5 years ago

Forgot props the first time, sorry.

[16924], [16925]

comment:8 @nacin5 years ago

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

comment:9 @nacin5 years ago

(In [16924]) Revert to WP_DEFAULT_THEME if a child theme is in use and no style.css is present. fixes #15712.

comment:10 @nacin5 years ago

(In [16925]) Revert to WP_DEFAULT_THEME if a child theme is in use and no style.css is present. fixes #15712, props greuben.

Note: See TracTickets for help on using tickets.