[wp-trac] [WordPress Trac] #45949: Allow plugins or themes to supply their own message when they caused a WSOD
WordPress Trac
noreply at wordpress.org
Fri Jan 11 22:55:16 UTC 2019
#45949: Allow plugins or themes to supply their own message when they caused a WSOD
-------------------------+-----------------------------
Reporter: Shelob9 | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Keywords:
Focuses: |
-------------------------+-----------------------------
#44524 "introduces a WP_Shutdown_Handler class that detects fatal errors
and which extension (plugin or theme) causes them. Such an error is then
recorded, and an error message is displayed." which is super cool. That
change adds a generic recommendations for getting support that I think are
a great default.
I was talking about this with @antpb the other day and we discussed how if
a plugin causes the crash, that plugin or theme should be able to
communicate how to get help. If not, the WordPress user is going to go to
WordPress.org/support or the host and eventually, hopefully make it to the
plugin's actual support system, which for a commercial plugin is likely
not WordPress.org. They might also go to the host who can help identify
which plugin or theme is to blame and then send the user to the plugin/
theme support.
That's a really bad user experience, they have a problem they want to go
right to how to fix it.
If plugins and themes could supply a message for how to get support right
away when things broke, that would be so much better.
The main problem we saw was that if there is a filter for the messages,
but how does the plugin that just got deactivated due to error hook into
that filter?
https://core.trac.wordpress.org/browser/trunk/src/wp-includes/class-wp-
shutdown-handler.php?rev=44524#L171
So we figured it could be a markdown file in the plugins repo. WordPress
could look in its file system for a file called error.md in the main
directory of the plugin/ theme that just errored or it could look on
WordPress.org for that file. Either way, it doesn't have to load the
plugin's main PHP file and the content of that file would be covered by
the WordPress.org plugin guidelines.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/45949>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list