WordPress.org

Make WordPress Core

Opened 17 months ago

Closed 15 months ago

Last modified 12 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 17 months ago.

Download all attachments as: .zip

Change History (15)

#1 @spacedmonkey
17 months ago

  • Description modified (diff)

Related: #44458

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


17 months ago

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


17 months ago

@spacedmonkey
17 months ago

#4 @spacedmonkey
17 months ago

  • Keywords has-patch added; needs-patch removed

Patch added.

#5 @pento
17 months ago

  • Milestone changed from Awaiting Review to 5.1

Adding to 5.1 milestone for consideration.

#6 @ocean90
17 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
17 months ago

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

#8 @flixos90
17 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
16 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
16 months ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

#11 @flixos90
16 months ago

  • Milestone changed from 5.1 to 5.2

#12 @flixos90
15 months ago

  • Milestone changed from 5.2 to 5.3

#13 @flixos90
15 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
12 months ago

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