WordPress.org

Make WordPress Core

Opened 5 days ago

Last modified 4 days ago

#47681 new enhancement

Critical error handler needs to offer backup troubleshooting instructions in addition to email

Reported by: tobifjellner Owned by:
Milestone: 5.3 Priority: normal
Severity: normal Version: 5.2
Component: Site Health Keywords: has-patch needs-testing
Focuses: Cc:

Description

https://build.trac.wordpress.org/browser/trunk/wp-includes/class-wp-fatal-error-handler.php?marks=173#L173 may show the message
The site is experiencing technical difficulties. Please check your site admin email inbox for instructions.
However: there are various reasons a rightful admin may not receive that email and therefore won't be able to follow those instructions.

Suggestion: Simply add "Or follow the debugging instructions in https://wordpress.org/support/article/debugging-in-wordpress/" (link should be translatable!)

This change needs for sure to be done in WP 5.3, but would be good to have already in a point release to 5.2 (and could could be seen as an error introduced with WP 5.2 – This particular message has generated a lot of questions over in the support forums.)

Attachments (4)

47681.patch (827 bytes) - added by dkarfa 5 days ago.
46881.patch (845 bytes) - added by dkarfa 5 days ago.
47681.1.patch (844 bytes) - added by Hareesh Pillai 4 days ago.
Minor change in capitalisation
47681.2.diff (909 bytes) - added by garrett-eclipse 4 days ago.
Re-use the 'Read about debugging in WordPress.' string and link from class-wp-site-health.php for this implementation

Download all attachments as: .zip

Change History (10)

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


5 days ago

@dkarfa
5 days ago

#2 @SergeyBiryukov
5 days ago

  • Component changed from Bootstrap/Load to Site Health

#3 @SergeyBiryukov
5 days ago

  • Milestone changed from Awaiting Review to 5.3
  • Version changed from 5.2.2 to 5.2

#4 @SergeyBiryukov
5 days ago

Thanks for the patch, @dkarfa! Just noting that here is not a great link text for accessibility reasons, and should not be a standalone string. I'd suggest linking debugging instructions instead.

@dkarfa
5 days ago

#5 @dkarfa
5 days ago

Welcome, @SergeyBiryukov I made the change and update the patch.

@Hareesh Pillai
4 days ago

Minor change in capitalisation

@garrett-eclipse
4 days ago

Re-use the 'Read about debugging in WordPress.' string and link from class-wp-site-health.php for this implementation

#6 @garrett-eclipse
4 days ago

  • Keywords has-patch needs-testing added

Hello, thanks for the initial patches @dkarfa & @hareesh-pillai

I've uploaded 47681.2.diff to address this issue by reusing the strings and link setup found in class-wp-site-health.php.

I went this direction for a few reasons;

  • Doesn't introduce new strings.
  • Applies to both of the messages, original patch only applied to the $message when is_protected_endpoint()
  • Adds the external link icon, security noopener and accessibility text
  • Uses string placeholders properly with sprintf the original patches had placeholders but no printf function to apply them.
  • Drops the repetitive debugging instructions as it was twice in the second patch; once before the link and the second as the link text.

Please review & test. Thanks

Note: See TracTickets for help on using tickets.