Hello!
Please send an email to [email protected] with the full error log, website page URL and a couple of screenshots to determine when the error triggers.
That said, is this related to WP AutoTerms plugin? The plugin does not support translations, and the error message is not very clear if the error is coming from this plugin or the theme.
Hi @wpautoterms,
Thank you for your fast answer.
The issue is related to WP Autoterms, it seems to point to a modification made from WP 6.7, changing the way translations must be loaded.
I confirm your plugin is loading translations in the file :
β¦/includes/wpautoterms.php line 71
public static function init_translations() {
load_plugin_textdomain( WPAUTOTERMS_SLUG,
false,
WPAUTOTERMS_PLUGIN_DIR . 'languages/' );
}
You can reproduce the bug by installing the latest WP on a server, with default theme, WP_DEBUG = TRUE, and install WP Autoterms as a unique plugin.
I will also send an email to the address you provided.
Have a nice day,
GB
-
This reply was modified 7 months, 2 weeks ago by
gingerbooch.
It’s not resolved. I’m using version 2.5.1 and getting the same error in debug.log. Here’s what Chatgpt has to say about it:
That message means the wpautoterms plugin (or some code related to it) is trying to load translation files too early in the WordPress lifecycle. Breaking it down:
_load_textdomain_just_in_time is a WordPress internal function responsible for loading translation files (.mo files).
- Problem: The translation for the text domain
wpautoterms was triggered before WordPress was ready β specifically, before the init hook.
- Cause: Most likely, the plugin is calling
load_plugin_textdomain() or using __() / _e() outside of a proper action hook, like at the file root level or during plugin include.
- WordPress expects translations to load on or after
init, because by then the necessary environment is fully prepared.
How to fix it (for plugin authors):
In the wpautoterms plugin or a child theme calling it:
β
Instead of this (executed too early):
load_plugin_textdomain( 'wpautoterms', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
β At root level of the main plugin file…
Do this instead:
add_action( 'init', function() {
load_plugin_textdomain( 'wpautoterms', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
});
We’re aware of the error. The warning message is related to WP 6.7+ versions but the latest plugin version is tested up to WP 6.5.5.
This warning message is being fixed now and it would be part with the next plugin version we’ll release.
In the meantime, as a temporary workaround, you can try to update the wp-config.php to make sure WP_DEBUG is set as false:
define('WP_DEBUG', false);
Hi @wpautoterms,
Thanks for your confirmation and fix to come.