Make WordPress Core

Opened 5 years ago

Closed 4 years ago

#47325 closed defect (bug) (worksforme)

Can't display fatal errors on WordPress 5.2

Reported by: vipestudio's profile vipestudio Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.2
Component: Bootstrap/Load Keywords: reporter-feedback
Focuses: Cc:

Description

Hi, guys, I am a WP dev,covering 100+ websites.

Since WP 5.2 update came, I can't display or log the fatal errors.

The only message I get is "The site is experiencing technical difficulties. Please check your site admin email inbox for instructions."

error_log only writes the notices and warnings, but fatal errors remain hidden. I was forced to downgrade a few sites just to see the fatal errors.

Same happens using wp-cli !

Tried this as well

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', true );
ini_set( 'display_errors', 1 );

it only shows the warnings, not the fatal errors.

Please help!

Attachments (1)

Screenshot 2019-05-21 at 12.53.20.png (199.4 KB) - added by johnbillion 5 years ago.
Fatal error shown when WP_DEBUG_DISPLAY or display_errors are enabled

Download all attachments as: .zip

Change History (13)

This ticket was mentioned in Slack in #core-php by vipestudio. View the logs.


5 years ago

#2 @earnjam
5 years ago

  • Version set to 5.2

#3 @SergeyBiryukov
5 years ago

  • Component changed from General to Bootstrap/Load
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Hi @vipestudio, welcome to WordPress Trac! Thanks for the report.

To see the error messages, you can add this line to your wp-config.php file:

define( 'WP_DISABLE_FATAL_ERROR_HANDLER', true );

This was previously discussed in #46825, which was closed as wontfix at the time, but could be reopened if there's enough interest in the latest patch.

Since it's better to keep the discussion in one place, I'm closing this ticket as a duplicate.

This ticket was mentioned in Slack in #core-php by joyously. View the logs.


5 years ago

#5 @joyously
5 years ago

This seems different to 46825.
What good is a log if the most important part (fatal errors) are not recorded?

#6 @johnbillion
5 years ago

  • Milestone set to Future Release
  • Resolution duplicate deleted
  • Status changed from closed to reopened

This is a separate issue. With define( 'WP_DEBUG_DISPLAY', true ), the fatal error message text should be displayed.

@johnbillion
5 years ago

Fatal error shown when WP_DEBUG_DISPLAY or display_errors are enabled

#7 @johnbillion
5 years ago

  • Keywords reporter-feedback added

@vipestudio As per above, you should be seeing the fatal error message text in your PHP error log always, and in the browser if display_errors or WP_DEBUG_DISPLAY are enabled.

Can you try deactivating the plugins on your site one by one in order see if the problem is caused by a plugin? If you're using any debugging plugins, ensure they're updated to the latest version to ensure maximum compatibility with this new functionality in WP 5.2.

This ticket was mentioned in Slack in #core-php by joyously. View the logs.


5 years ago

#9 @joyously
5 years ago

I tried it with WP_DEBUG true and WP_DEBUG_LOG true (no others set).
I saw the error in the browser (with technical difficulties message) and in the debug_log in wp-content.
I commented out WP_DEBUG and WP_DEBUG_LOG and tried again.
I saw the error in the browser (with technical difficulties message) and not in the debug_log.
I have my PHP set to show errors though, since it's a test site.

This ticket was mentioned in Slack in #docs by tobifjellner. View the logs.


5 years ago

This ticket was mentioned in Slack in #forums by tobifjellner. View the logs.


5 years ago

#12 @johnbillion
4 years ago

  • Milestone Future Release deleted
  • Resolution set to worksforme
  • Status changed from reopened to closed

Closing as there's been no further feedback. If this is still an issue with all plugins deactivated and one of the default themes such as Twenty Twenty in use, please reopen and include details of your server and PHP configuration. Cheers!

Note: See TracTickets for help on using tickets.