Make WordPress Core

Opened 18 years ago

Closed 18 years ago

#9519 closed defect (bug) (fixed)

Delete a child theme will delete parent theme

Reported by: Wupperpirat Owned by:
Priority: normal Milestone: 2.8
Component: General Version: 2.8
Severity: normal Keywords: has-patch needs-testing
Cc: Focuses:

Description

I'm one of the maintainers and supporters of Thematic testing a lot of child themes. Today I wanted to clean up my theme directory using the backend. Deleting one of my child themes will delete the parent theme instead.

I'm running the current 2.8 SVN version 10912 on my local machine.

Let me know if you need more details.

Thanks,

Chris

Attachments (2)

9519.diff​ (590 bytes ) - added by ionfish 18 years ago.
9519.1.diff​ (1.4 KB ) - added by ionfish 18 years ago.

Download all attachments as: .zip

Change History (8)

#1 @DD32
18 years ago

  • Milestone Unassigned → 2.8

So the child theme remains? Just the Parent theme gets deleted? (Looks like someone got Template vs Stylesheet mixed up)

#2 @ionfish
18 years ago

  • Keywords has-patch needs-testing added; delete child theme child theme removed

Can you test the attached patch?

#3 @DD32
18 years ago

ionfish: Did you test that at all? It doesnt look like it'd do anything at all to me.

$_GETstylesheet isnt passed at all, Line 197 of themes.php passes in $template, All occurences of $template related to the deletion should probably be renamed to $stylesheet

#4 @ionfish
18 years ago

The Preview and Activate URIs both include the template and the stylesheet (now I look, the Delete one doesn't), so I based my patch on that. Here's an updated one.

#5 @Wupperpirat
18 years ago

Thanks a lot for your help .. the last 9519.1.diff is working .. I checked deletion of child themes: worked .. and I checked deletion of standard themes: worked.

Again .. thanks a lot for your help & Happy Easter!

Cheers,

Chris

#6 @ryan
18 years ago

  • Resolution → fixed
  • Status new → closed

(In [10915]) Use stylesheet directory when deleting a theme so we don't accidentally delete a parent theme. Props ionfish. fixes #9519

Note: See TracTickets for help on using tickets.