Make WordPress Core

Opened 8 years ago

Closed 7 years ago

Last modified 7 years ago

#45932 closed defect (bug) (invalid)

Call wp_load_translations_early in WP_Shutdown_Handler

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

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 8 years ago.

Download all attachments as: .zip

Change History (15)

#1 @spacedmonkey
8 years ago

  • Description modified (diff)

Related: #44458

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


8 years ago

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


8 years ago

@spacedmonkey
8 years ago

#4 @spacedmonkey
8 years ago

  • Keywords has-patch added; needs-patch removed

Patch added.

#5 @pento
8 years ago

  • Milestone Awaiting Review5.1

Adding to 5.1 milestone for consideration.

#6 @ocean90
8 years 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
8 years ago

  • Keywords needs-testing removed
  • Owner set to flixos90
  • Status newreviewing

#8 @flixos90
8 years ago

  • Resolutionfixed
  • Status reviewingclosed

In 44622:

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

Props spacedmonkey.
Fixes #45932. See #44458.

#9 @flixos90
8 years 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
8 years ago

  • Resolution fixed
  • Status closedreopened

#11 @flixos90
8 years ago

  • Milestone 5.15.2

#12 @flixos90
8 years ago

  • Milestone 5.25.3

#13 @flixos90
7 years ago

  • Milestone 5.3
  • Resolutioninvalid
  • Status reopenedclosed

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

#14 @spacedmonkey
7 years ago

  • Component Bootstrap/LoadSite Health
Note: See TracTickets for help on using tickets.