Make WordPress Core

Opened 16 years ago

Closed 16 years ago

#9519 closed defect (bug) (fixed)

Delete a child theme will delete parent theme

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

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 16 years ago.
9519.1.diff (1.4 KB) - added by ionfish 16 years ago.

Download all attachments as: .zip

Change History (8)

@ionfish
16 years ago

#1 @DD32
16 years ago

  • Milestone changed from Unassigned to 2.8

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

#2 @ionfish
16 years ago

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

Can you test the attached patch?

#3 @DD32
16 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
16 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.

@ionfish
16 years ago

#5 @Wupperpirat
16 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
16 years ago

  • Resolution set to fixed
  • Status changed from new to 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.