Make WordPress Core

Opened 12 years ago

Closed 10 years ago

#21670 closed defect (bug) (fixed)

ERROR: The themes directory is either empty or doesn’t exist. Please check your installation.

Reported by: pathawks's profile pathawks Owned by: nacin's profile nacin
Milestone: 3.7 Priority: normal
Severity: minor Version:
Component: Themes Keywords: has-patch commit
Focuses: Cc:

Description

In multi-site mode, if there are no themes enabled for a particular site and no network enabled themes, that site's dashboard will report the error

ERROR: The themes directory is either empty or doesn’t exist. Please check your installation.

Ov course, this isn't entirely accurate. The themes directory may not be empty, but the problem is that no themes are enabled. The wording should probably be updated to reflect this.

Attachments (6)

21670.patch (688 bytes) - added by SergeyBiryukov 12 years ago.
21670.diff (7.3 KB) - added by johnbillion 11 years ago.
Screen Shot 2013-08-07 at 22.13.55.png (15.8 KB) - added by johnbillion 11 years ago.
Before screenshot
Screen Shot 2013-08-07 at 22.13.33.png (15.2 KB) - added by johnbillion 11 years ago.
After screenshot
21670.2.diff (2.7 KB) - added by nacin 11 years ago.
21670.3.diff (2.7 KB) - added by nacin 11 years ago.
Uses double quotes around %s in the new error message.

Download all attachments as: .zip

Change History (18)

#1 @SergeyBiryukov
12 years ago

  • Component changed from Warnings/Notices to Multisite

#2 @pathawks
12 years ago

I was mistaken regarding the root of the problem.

I was getting the error message because I deleted twentyeleven, which was selected as the theme of the site in question.
So the problem wasn't that there were no themes in the themes directory, but that the selected theme no longer existed.

I still think the wording could be made a bit more clear.

#3 @SergeyBiryukov
12 years ago

  • Component changed from Multisite to Themes

#4 @SergeyBiryukov
12 years ago

  • Keywords has-patch added

#6 @nacin
11 years ago

  • Milestone changed from Awaiting Review to 3.6
  • Owner set to nacin
  • Status changed from new to accepted

#7 @ryan
11 years ago

  • Milestone changed from 3.6 to Future Release

@johnbillion
11 years ago

#8 @johnbillion
11 years ago

I've just patched this up and I was about to add a new ticket and then found this one.

My attached patch displays the error message from the WP_Error object similarly to Sergey's patch, and additionally displays the error on the Appearance screen, hides the various theme metadata and customize controls there if there's an error, and improves the error message for theme_not_found.

Note that my patch looks like it does a lot but in fact it's just an extra tab indent for the most part. Best viewed without whitespace changes.

Last edited 11 years ago by johnbillion (previous) (diff)

@johnbillion
11 years ago

Before screenshot

@nacin
11 years ago

#9 @nacin
11 years ago

21670.2.diff only suppresses the rest of the current theme information on themes.php if the error is fatal in nature. (I've thought about introducing levels or groups of errors here, but haven't.) Basically: If something is wrong with the parent theme, or if index.php is missing, most things still work. (All other errors have to do with style.css being unreadable or missing.)

#10 @nacin
11 years ago

  • Keywords commit added

@nacin
11 years ago

Uses double quotes around %s in the new error message.

#11 @nacin
11 years ago

  • Milestone changed from Future Release to 3.7

#12 @nacin
10 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 25666:

Show a proper error message on the dashboard when the current theme is broken.

Clean up Appearance -> Themes when we don't have enough information to show for a broken theme.

Clean up broken/ugly "alt" row styling when we are displaying broken themes.

props johnbillion for initial patch.
fixes #21670.

Note: See TracTickets for help on using tickets.