[wp-trac] [WordPress Trac] #35286: Broken theme error message is very confusing

WordPress Trac noreply at wordpress.org
Wed Jan 6 07:57:51 UTC 2016


#35286: Broken theme error message is very confusing
-------------------------------------+-----------------------------
 Reporter:  mayukojpn                |       Owner:
     Type:  enhancement              |      Status:  new
 Priority:  normal                   |   Milestone:  Future Release
Component:  Themes                   |     Version:  trunk
 Severity:  normal                   |  Resolution:
 Keywords:  ux-feedback needs-patch  |     Focuses:  administration
-------------------------------------+-----------------------------
Changes (by swissspidy):

 * keywords:  ux-feedback has-patch => ux-feedback needs-patch
 * milestone:  Awaiting Review => Future Release


Comment:

 Looking at the `WP_Theme` source code, a theme is broken when there's at
 least 1 `WP_Error`. Some possible errors:

 * Theme directory does not exist (`theme_not_found`)
 * Themes directory does not exist (`theme_root_missing`)
 * Stylesheet is missing (`theme_no_stylesheet`)
 * Stylesheet is not readable (`theme_stylesheet_not_readable`)
 * Template is missing (`theme_no_index`)
 * Parent theme is missing (`theme_no_parent`)
 * X is not a valid parent theme (`theme_parent_invalid`)

 The `The following themes are installed but incomplete. Themes must have a
 stylesheet and a template.` message is just a general warning, while the
 detailed description is shown below. It is misleading, because a theme can
 also have errors when it definitely has a stylesheet and a template.

 In your case, the child theme was missing its `index.php` file and I
 wonder why adding it didn't solve the issue (cache?).

 So, my suggestions:

 * Change the `Template is missing` message to something like `Main Index
 Template is missing` to make it more clear/helpful. That terminology is
 already used in `$wp_file_descriptions`.
 * Change `The following themes are installed but incomplete. Themes must
 have a stylesheet and a template.` to just `The following themes are
 installed but incomplete.`

 Any objections?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35286#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list