WordPress.org

Make WordPress Core

Opened 20 months ago

Closed 7 months ago

#21670 closed defect (bug) (fixed)

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

Reported by: pathawks Owned by: 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 20 months ago.
21670.diff (7.3 KB) - added by johnbillion 9 months ago.
Screen Shot 2013-08-07 at 22.13.55.png (15.8 KB) - added by johnbillion 9 months ago.
Before screenshot
Screen Shot 2013-08-07 at 22.13.33.png (15.2 KB) - added by johnbillion 9 months ago.
After screenshot
21670.2.diff (2.7 KB) - added by nacin 7 months ago.
21670.3.diff (2.7 KB) - added by nacin 7 months ago.
Uses double quotes around %s in the new error message.

Download all attachments as: .zip

Change History (18)

comment:1 SergeyBiryukov20 months ago

  • Component changed from Warnings/Notices to Multisite

comment:2 pathawks20 months 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.

comment:3 SergeyBiryukov20 months ago

  • Component changed from Multisite to Themes

SergeyBiryukov20 months ago

comment:4 SergeyBiryukov20 months ago

  • Keywords has-patch added

comment:6 nacin16 months ago

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

comment:7 ryan11 months ago

  • Milestone changed from 3.6 to Future Release

johnbillion9 months ago

comment:8 johnbillion9 months 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 theme screen, hides the various customize control 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.

Version 0, edited 9 months ago by johnbillion (next)

johnbillion9 months ago

Before screenshot

johnbillion9 months ago

After screenshot

nacin7 months ago

comment:9 nacin7 months 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.)

comment:10 nacin7 months ago

  • Keywords commit added

nacin7 months ago

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

comment:11 nacin7 months ago

  • Milestone changed from Future Release to 3.7

comment:12 nacin7 months 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.