Make WordPress Core

Opened 17 years ago

Closed 16 years ago

Last modified 16 years ago

#4515 closed defect (bug) (invalid)

What if the Default theme is missing?

Reported by: technosailor's profile technosailor Owned by: pishmishy's profile pishmishy
Milestone: Priority: normal
Severity: normal Version: 2.3
Component: Template Keywords: has-patch needs-testing
Focuses: Cc:

Description

The expected behavior of WordPRess is that if the theme set in the database becomes unavailable because of deletion or file permissions, the default Kubrick theme is used instead.

The bug exists in that if the default theme also doesn't exist, the site breaks.

My suggestion is that if default is also unavailable that the first theme that IS available is used instead. Only if there are no themes should a site completely die - and even then, well, there could always be a plaintext rendering.

Attachments (1)

theme.php.patch (608 bytes) - added by pishmishy 17 years ago.
Patch to display error message under these conditions.

Download all attachments as: .zip

Change History (9)

#1 @rob1n
17 years ago

As far as my understanding goes, the default theme should *always* be there. Can we rely on another theme having a certain template? I wouldn't really want to.

#2 @technosailor
17 years ago

But what *if* it isn't? ;) I realize some will argue the point that Enterprises are niche, however, in our case we have chosen to remove classic and default for the sake of efficiency. I have to add it back which isn't really that bad all things considered - but, it highlights the problem.

Logic says that yes default will be there 99% of the time but in the off chance that someone does what we have or goes and deltes the theme for their own reasons, do we *really* want WP to break?

I would argue that we don't and we should find a way to make sure that if all else fails, we can programmatically still serve the site.

@pishmishy
17 years ago

Patch to display error message under these conditions.

#3 @pishmishy
17 years ago

  • Keywords has-patch added

It's not going to be a straight forward task to have WordPress generate even basic output without a theme present on the system. I've created this patch which will tell you why WordPress is broken when the default theme and the selected theme are missing.

#4 @pishmishy
17 years ago

  • Cc james@… added

#5 @pishmishy
17 years ago

  • Owner changed from anonymous to pishmishy
  • Status changed from new to assigned

#6 @pishmishy
16 years ago

  • Keywords needs-testing added

#7 @ryan
16 years ago

  • Resolution set to invalid
  • Status changed from assigned to closed

We no longer revert to the default theme if there is a problem with the current theme.

#8 @Nazgul
16 years ago

  • Milestone 2.5 deleted
Note: See TracTickets for help on using tickets.