[wp-trac] [WordPress Trac] #62349: Translations doing_it_wrong() fatal with wp_load_translations_early()
WordPress Trac
noreply at wordpress.org
Tue Nov 5 20:25:26 UTC 2024
#62349: Translations doing_it_wrong() fatal with wp_load_translations_early()
--------------------------+-----------------------------
Reporter: kkmuffme | Owner: swissspidy
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: Awaiting Review
Component: I18N | Version: trunk
Severity: blocker | Keywords:
Focuses: |
--------------------------+-----------------------------
Caused by changes in https://core.trac.wordpress.org/ticket/44937
While testing 6.7 RC, I encountered an issue where this leads to a fatal
error when `wp_load_translations_early()` is called early (e.g. in wpdb)
If WP_DEBUG is enabled or any hook in the doing_it_wrong functions is
hooked onto and loads translated text with __(), this will usually result
in an infinite loop/fatal - essentially what was already discovered in
query monitor: https://core.trac.wordpress.org/ticket/44937#comment:12
However unlike that query monitor fix, this is inherent to
`wp_load_translations_early()` it seems as well as to any hooks hooked on
doing_it_wrong stuff
Additionally, also it shouldn't trigger a doing it wrong for
load_textdomain() when it's called via `wp_load_translations_early()`
since that's a catch 22.
I guess this should be fixed before WP 6.7 is released?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62349>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list