#62349 closed defect (bug) (wontfix)
Translations doing_it_wrong() fatal with wp_load_translations_early()
Reported by: | kkmuffme | Owned by: | swissspidy |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 6.7 |
Component: | I18N | Keywords: | needs-patch |
Focuses: | Cc: |
Description (last modified by )
Caused by changes in #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?
Change History (5)
#2
@
5 weeks ago
- Description modified (diff)
- Keywords reporter-feedback needs-patch added
- Milestone changed from Awaiting Review to 6.7.1
- Severity changed from blocker to normal
People already get notified when being assigned. But there's usually no need for either. The people involved in the current release will triage tickets accordingly.
Do you perhaps have more concrete steps to reproduce this? This way can truly assess the severit.
Theoretically a call to wp_load_translations_early()
and then load_textdomain()
will populate the $l10n
global already, so just-in-time translation loading wouldn't kick in.
In any case, we should be able to add some end-to-end tests for wp_load_translations_early()
thanks to the work from #61240
#3
@
5 weeks ago
- Milestone changed from 6.7.1 to Future Release
At first glance I don't run into any fatals or infinite loops when triggering wp_load_translations_early()
.
And when someone is hooking into doing_it_wrong
like Query Monitor did, then it's up to them to unhook themselves to prevent infinite loops.
So yeah, without any clear steps to reproduce I actually don't see an issue here.
OT: just to be sure: when I assign somebody to a ticket, do you get notified or do I also @ the person? e.g. @swissspidy