Make WordPress Core

Opened 19 months ago

Closed 17 months ago

Last modified 14 months ago

#45932 closed defect (bug) (invalid)

Call wp_load_translations_early in WP_Shutdown_Handler

Reported by: spacedmonkey Owned by: flixos90
Milestone: Priority: normal
Severity: normal Version: 5.1
Component: Site Health Keywords: servehappy has-patch
Focuses: multisite Cc:

Description (last modified by spacedmonkey)

It a PHP error handles extremely early in the bootstrap process, say in the wp-config.ph file, the WP_Shutdown_Handler will display an error message. This error message is run through the __ translation functions, but as the functions do not exist yet, these string fail to translated. Other parts of core, like wp-db class call the wp_load_translations_early function to fix this issue.

Attachments (1)

45932.diff (642 bytes) - added by spacedmonkey 19 months ago.

Download all attachments as: .zip

Change History (15)

#1 @spacedmonkey
19 months ago

  • Description modified (diff)

Related: #44458

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

19 months ago

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

19 months ago

19 months ago

#4 @spacedmonkey
19 months ago

  • Keywords has-patch added; needs-patch removed

Patch added.

#5 @pento
19 months ago

  • Milestone changed from Awaiting Review to 5.1

Adding to 5.1 milestone for consideration.

#6 @ocean90
19 months ago

Haven't looked in detail when this handler is called but if wp_load_translations_early() is available it should be used.

#7 @flixos90
19 months ago

  • Keywords needs-testing removed
  • Owner set to flixos90
  • Status changed from new to reviewing

#8 @flixos90
19 months ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 44622:

Bootstrap/Load: Use wp_load_translations_early() when Translation API is not yet loaded.

Props spacedmonkey.
Fixes #45932. See #44458.

#9 @flixos90
19 months ago

In 44717:

Bootstrap/Load: Revert fatal error recovery mechanism from 5.1 to polish for 5.2.

Due to the high number of follow-up tickets and associated security concerns, it was decided to reschedule the fatal error recovery feature for WordPress 5.2, in order to address these issues properly. The feature will continue to be developed, with iterations being merged into trunk early in the 5.2 release cycle.

Fixes #46141. See #44458, #45932, #45940, #46038, #46047, #46068.

#10 @flixos90
19 months ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

#11 @flixos90
19 months ago

  • Milestone changed from 5.1 to 5.2

#12 @flixos90
17 months ago

  • Milestone changed from 5.2 to 5.3

#13 @flixos90
17 months ago

  • Milestone 5.3 deleted
  • Resolution set to invalid
  • Status changed from reopened to closed

This ticket is based on the old fatal error recovery mode implementation and will be covered as part of #46130.

#14 @spacedmonkey
14 months ago

  • Component changed from Bootstrap/Load to Site Health
Note: See TracTickets for help on using tickets.