-
-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
_load_textdomain_just_in_time was called incorrectly #919
Comments
Thanks for the report. I've already been looking into a fix for this. It's ironically caused by the "Doing it wrong" handler in Query Monitor which gets triggered when another plugin loads a translation too early. |
It's true because having deactivated the other plugins that have the same error, I no longer get the query monitor error. Thanks for your quick response |
@f14m07 Are you still seeing this problem with WordPress 6.7.1? |
No it's Ok Not new issue. |
Still getting this error in WordPress 6.7.1: [06-Dec-2024 16:46:04 UTC] PHP Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the |
I'm seeing this problem in a different context now. ElasticPress makes a remote HTTP call using wp_remote_post() and as Query Monitor monitors all those, QM itself is calling __() earlier than expected here. I'm still debugging it but wanted to share this finding asap, so hopefully it helps. Also worth noting I'm having a hard time reproducing all these problems, as the notice will not be displayed unless I delete all transients using |
Thanks. This seems like a never ending problem once you dig into it. I'll need to do some work to shift all the translation strings out of the collectors and into the output. |
Just documenting a conversation with John. I was seeing similar errors and think it may be do to a response from
What a PITA this change has been. Silently failing seems to be so much better. |
Got tired of seeing this and with some help from John (thanks John) I give you. https://gist.github.com/afragen/986ba6046ebea963074283a77cae07fc |
It can be temporarily fixed by #940. |
Hi,
I have this message in my php error log since the last WP 6.7 update.
To see this error your site must be in a foreign language and you must have debug mode.
Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the
query-monitor
domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at theinit
action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /Users/xxxx/Local Sites/clone-reve/app/public/wp-includes/functions.php on line 6114This isn't the only plugin to have this problem.
You must be in debug mode and with a foreign lang site to reproduce this notice.
Could you update your code please ?
Thanks for all.
Have a nice day.
Frédéric
The text was updated successfully, but these errors were encountered: