Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
If you're experiencing issues where debug mode reveals errors like 'Function _load_textdomain_just_in_time was called incorrectly' and translation loading for various domains is triggered too early, this indicates that some code in your plugin or theme is executing prematurely. Translations should ideally load at the 'init' action or later.
Solution:
We recommend checking the full error log to identify the specific plugins or themes causing these errors. The errors are likely due to plugins such as 'ultimate_vc', 'wpmf', and 'wc-aelia-foundation' loading WordPress translation files too early. You should report these errors to the respective plugin or theme authors as they need to adjust their code to prevent these errors from occurring. For more detailed information, please visit WPML Errata.

Please note that this solution might be irrelevant if it's outdated or not applicable to your case. If these steps do not resolve your issue, we highly recommend checking related known issues at WPML Known Issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the problem persists, please open a new support ticket with us for further assistance.

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 3 replies, has 0 voices.

Last updated by Dražen 1 month ago.

Assisted by: Dražen.

Author Posts
June 1, 2025 at 11:36 pm #17096003

davidF-106

Background of the issue:
I enabled debug mode for a minute on the site hidden link and all these errors started showing up on both the admin mode and front end. Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for various domains 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 the init action or later. This message was added in version 6.7.0. in /usr/www/users/me/myweb/wp-includes/functions.php on line 6121. However, if I look in functions.php it is not even close to 6121 lines long.

Symptoms:
Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for various domains was triggered too early.

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wc-aelia-foundation-classes 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 the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /usr/www/users/me/myweb/wp-includes/functions.php on line 6121

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the woocommerce-aelia-currencyswitcher 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 the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /usr/www/users/me/myweb/wp-includes/functions.php on line 6121

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wpmf 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 the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /usr/www/users/me/myweb/wp-includes/functions.php on line 6121

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the ultimate_vc 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 the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /usr/www/users/me/myweb/wp-includes/functions.php on line 6121

Questions:
Is there a known issue or a way to figure out what is happening to see what is on line 6121?

June 2, 2025 at 6:37 am #17096373

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

this is error from plugin/theme that is loading WordPress transaltion file to early. You should check full error log and report the error to plugin/theme author, I am afraid it is not related to WPML.

More info:
- https://wpml.org/errata/php-error-wp-6-7-notice-function-_load_textdomain_just_in_time-was-called/

Regards,
Drazen

June 3, 2025 at 11:35 pm #17104228

davidF-106

Okay, but how do I find that line in functions.php when the file is a faction of the line it tells me is causing the issue. Is there some wordpress trick or way to get it from the browser in debug mode (or maybe your system has a way to find it?).

Thanks.

June 4, 2025 at 6:30 am #17104504

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

it is WordPress code,that was changed, it will not help to do anything there.

Plugin author needs to adjust their code so it will not trigger error from WordPress. For example you have these plugins causing issue: ultimate_vc domain, wpmf, wc-aelia-foundation.

Regards,
Drazen