Opened 7 years ago
Closed 2 years ago
#43335 closed enhancement (wontfix)
Consistency for error reporting when theme is broken or not working
Reported by: | bashaus | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.9.4 |
Component: | Themes | Keywords: | close 2nd-opinion |
Focuses: | Cc: |
Description
Even when WP_DEBUG is enabled, if a theme is missing or not appropriately configured, there is no error messaging to appropriately debug the issue. Whether this be on the frontend or in the error logs.
For example: if there's no database connection, the error message "Error Establishing a Database Connection" is displayed in a Heading 1. If no theme is found, the HTTP response body is blank.
To reproduce this issue:
- Rename the folder of the active theme
- Go to the homepage of the WordPress site
The recommendation of this ticket is to display an error message on the frontend and report to the error logs that rendering could not occur.
Change History (3)
#2
@
7 years ago
- Keywords close 2nd-opinion added
Hi @bashaus, welcome to WordPress Trac! Thanks for the report.
The recommendation of this ticket is to display an error message on the frontend
That's already the case, though the message is only displayed to logged-in users with switch_themes
capability:
The theme directory "twentyseventeen" does not exist.
See the discussion in #21931. We could reconsider this, though I don't see any benefit in displaying the message for regular visitors, search engines, etc.
Related: #21931