[wp-trac] [WordPress Trac] #21931: White screen of death if theme can't be found

WordPress Trac noreply at wordpress.org
Tue Dec 15 15:55:24 UTC 2015


#21931: White screen of death if theme can't be found
------------------------------------+-----------------------
 Reporter:  ericlewis               |       Owner:
     Type:  enhancement             |      Status:  reopened
 Priority:  normal                  |   Milestone:  4.5
Component:  Themes                  |     Version:
 Severity:  normal                  |  Resolution:
 Keywords:  dev-feedback has-patch  |     Focuses:
------------------------------------+-----------------------

Comment (by nacin):

 I don't hate [attachment:21931.4.diff], but I'm not sold on showing this
 to anonymous users. Minor code thing: a `WP_Error` object can be passed
 directly to `wp_die()`.

 Way back when (according to lore), WP used to actively switch to the
 default theme on the frontend when the theme was broken. In some
 situations (network-based filesystem, perhaps? — I assume an I/O glitch),
 this would cause a perfectly normal site to suddenly switch to the default
 theme. This now only happens in the admin in `validate_current_theme()`.
 Just providing some additional context, which may help inform whether cap
 checks are necessary here.

 One other question to think about: under what circumstances would this
 `else` block be hit? Are we unnecessarily calling `wp_get_theme()` (a
 filesystem hit) in a common situation where we shouldn't?

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


More information about the wp-trac mailing list