WordPress.org

Make WordPress Core

Opened 5 years ago

Last modified 6 months ago

#14824 new defect (bug)

WordPress is not updating Theme option after making a theme a child theme by adding the line 'Template' to the child`s css without refreshing Theem activation

Reported by: drale2k Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 3.1
Component: Themes Keywords: needs-patch close
Focuses: Cc:

Description

Situation:

If you have 2 Themes on a 2 sites MultiSite install (each site is using one theme) and want to make one of them a child Theme of the other, you will go to one of them and add the line 'Template: NAME OF THE PARENT THEME' and save it.

After doing so the Child Theme will not inherit any Template Files from the parent until you deactivate/activate the Child Theme again.

Although it says in the "Themes/Appereance" section of the Child Themes backend 'CHILD THEME NAME uses templates from PARENT THEME NAME. Changes made to the templates will affect both themes.' even before deactivating/activating the Child Theme.

Looks like the template page might be checking the style.css and not update the option.

Change History (6)

comment:1 @nkuttler5 years ago

This doesn't seem to be ms-specific. The manage themes page indeed shows an incorrect "All of this theme’s files are located in..." line that doesn't correspond to what's shown on the frontend. This is rather confusing for theme developers.

comment:2 @nkuttler5 years ago

  • Cc office@… added

comment:3 follow-up: @nacin4 years ago

  • Keywords needs-patch added; child theme inherit removed
  • Milestone changed from Awaiting Review to Future Release

We can probably fix it for the frontend with a sanity check whenever we detect the change in the admin.

comment:4 @chriscct79 months ago

This is super edge case. Unless I'm misreading this, an affirmative action (in this case deactivate and reactivating it) might be a good thing before suddenly inheriting, as I could see a situation where if you had a person developing a theme that was to be a child theme, and they're close to the end and they add the child theme line, and suddenly WordPress starts inheriting it, that would be a problem.

comment:5 in reply to: ↑ 3 @obenland6 months ago

  • Keywords close added

Replying to nacin:

We can probably fix it for the frontend with a sanity check whenever we detect the change in the admin.

Can you get in more detail about the approach you thought of here?

I think it is fair to expect some sort of an affirmative action, as chriscct7 mentioned, in a case like this. Given how uncommon a change like this is, I also wonder if really need to account for it in the first place.

comment:6 @helen6 months ago

FWIW, this was one of the very first things that tripped me up when I started working with WP, right around the time this ticket was opened. Agree that it's not common, but I recall it being very frustrating because the admin showed me the expected child theme line but the front-end "failure" was totally silent.

Note: See TracTickets for help on using tickets.