WordPress.org

Make WordPress Core

Opened 2 months ago

Last modified 7 days ago

#47325 reopened defect (bug)

Can't display fatal errors on WordPress 5.2

Reported by: vipestudio Owned by:
Milestone: Future Release 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 2 months ago.
Fatal error shown when WP_DEBUG_DISPLAY or display_errors are enabled

Download all attachments as: .zip

Change History (12)

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


2 months ago

#2 @earnjam
2 months ago

  • Version set to 5.2

#3 @SergeyBiryukov
2 months 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.


2 months ago

#5 @joyously
2 months ago

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

#6 @johnbillion
2 months 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
2 months ago

Fatal error shown when WP_DEBUG_DISPLAY or display_errors are enabled

#7 @johnbillion
2 months 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.


2 months ago

#9 @joyously
2 months 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.


7 days ago

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


7 days ago

Note: See TracTickets for help on using tickets.