Make WordPress Core

Opened 5 years ago

Last modified 5 years ago

#45949 new enhancement

Allow plugins or themes to supply their own message when they caused a WSOD

Reported by: shelob9's profile Shelob9 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Bootstrap/Load Keywords:
Focuses: Cc:

Description

#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.

Change History (4)

#1 @TimothyBlynJacobs
5 years ago

Another option could be a Support URI header like Author URI.

#2 @joyously
5 years ago

or it could look on WordPress.org for that file

That doesn't help those premium plugins you were trying to help.

I think the error shown on the front end is generic by design. The information shown in the admin could specifically say which plugin or theme, so there isn't much need for more details. Just deactivate the plugin to get the site going again, and handle support after.

#3 @Shelob9
5 years ago

or it could look on WordPress.org for that file

That doesn't help those premium plugins you were trying to help.

To clarify, when I said commercial plugins I was trying to define plugins on WordPress.org that are freemium,such as WooCommerce or apiware like Akiskmet.

The fastester we get frustrated users to the right help, the less frustrated they are going to get and the eaiser it's going to be to help them.

Another option could be a Support URI header

That's a great idea.

#4 @swissspidy
5 years ago

  • Component changed from General to Bootstrap/Load

Please keep internationalization in mind. A support URI header would be way easier to implement than a custom text header or a markdown file...

Note: See TracTickets for help on using tickets.