Make WordPress Core

Opened 13 years ago

Closed 13 years ago

#19089 closed defect (bug) (fixed)

PHP notice when themes dir. is empty, doesn't exist or the path is wrong

Reported by: azaozz's profile azaozz Owned by: ryan's profile ryan
Milestone: 3.3 Priority: normal
Severity: normal Version:
Component: Themes Keywords: has-patch dev-feedback
Focuses: Cc:

Description

On new installs we run quite a bit of code trying to find a theme (so the front-end is not a white screen) but don't show an error if a theme cannot be found. This can happen if WordPress is not installed properly or the path to wp-content/themes is wrong (for example in WP_CONTENT_DIR).

In these cases there's also a notice in get_current_theme().

Attachments (1)

19089.patch (1.6 KB) - added by azaozz 13 years ago.
Fix notice and show a warning on the dashboard when there aren't any themes available

Download all attachments as: .zip

Change History (6)

@azaozz
13 years ago

Fix notice and show a warning on the dashboard when there aren't any themes available

#1 @ocean90
13 years ago

Mhh, in your patch $current_theme = 'Twenty Ten';, need to change it to Twenty Eleven?

#2 @azaozz
13 years ago

That was in there, not sure why. Could probably be empty string as it's set before a theme is found and then overwritten couple of lines down.

#4 @edwardw
13 years ago

  • Keywords has-patch dev-feedback added

#5 @ryan
13 years ago

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

In [19251]:

Avoid notice when themes dir is empty or missing. Don't reset current theme in current_theme_info() if there are no themes. Show warning in Right Now if there are no themes. Props azaozz. fixes #19089

Note: See TracTickets for help on using tickets.