Make WordPress Core

Changeset 53951


Ignore:
Timestamp:
08/28/2022 07:49:40 PM (22 months ago)
Author:
Clorith
Message:

Site Health: Improve the fatal error handling text in multisite scenarios.

The fatal error handler is responsible for providing a more user-friendly page to visitors if a site would normally encounter a fatal error, informing them of the next steps to access recovery mode (where applicable).

Those next steps would be to check the email address for the site administrator, but this was only the case for single site installs; In a multisite scenario, no email is sent.

This changes the text to account for that, still informing site administrators to check their email if it is a single site, but for multisite directing users to reach out to their site administrator for further assistance, so that they may take appropriate action.

Props rkaiser0324, Clorith.
Fixes #48929.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-fatal-error-handler.php

    r53316 r53951  
    185185            $message = __( 'There has been a critical error on this website, putting it in recovery mode. Please check the Themes and Plugins screens for more details. If you just installed or updated a theme or plugin, check the relevant page for that first.' );
    186186        } elseif ( is_protected_endpoint() && wp_recovery_mode()->is_initialized() ) {
    187             $message = __( 'There has been a critical error on this website. Please check your site admin email inbox for instructions.' );
     187            if ( is_multisite() ) {
     188                $message = __( 'There has been a critical error on this website. Please reach out to your site administrator, and inform them of this error for further assistance.' );
     189            } else {
     190                $message = __( 'There has been a critical error on this website. Please check your site admin email inbox for instructions.' );
     191            }
    188192        } else {
    189193            $message = __( 'There has been a critical error on this website.' );
Note: See TracChangeset for help on using the changeset viewer.