Opened 4 months ago
Closed 4 months ago
#62557 closed defect (bug) (worksforme)
Language still messed up
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 6.7.1 |
Component: | I18N | Keywords: | |
Focuses: | Cc: |
Description
I have a shop mioselection.com. Since the 6.7 Update, there was half english half german language. Bevore there was everything german.
I updated to 6.7.1 today, and translation still messed up.
Still a lot of following error messages:
[24-Nov-2024 10:11:08 UTC] PHP Notice: Function _load_textdomain_just_in_time was called <strong>incorrectly</strong>. Translation loading for the <code>woocommerce-paypal-payments</code> 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 <code>init</code> action or later. Please see <a href="https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/">Debugging in WordPress</a> for more information. (This message was added in version 6.7.0.) in /home/fifuhoti/public_html/mioselection.com/wp-includes/functions.php on line 6114
It seams, all plugins and also the theme is triggering the same error.
<?php add_action('init', function () { if (function_exists('load_plugin_textdomain')) { load_plugin_textdomain('WUKCAL', PLUGINDIR.'/'.dirname(plugin_basename(__FILE__)).'/languages', dirname(plugin_basename( __FILE__ )).'/languages'); } });
How is that wrong?
That means those plugins are still doing and wrong and the devs need to follow https://make.wordpress.org/core/2024/10/21/i18n-improvements-6-7/ to make their code more robust.
Most plugins and themes have already released updates by now, so make sure your site is up-to-date.
That code alone is not wrong.
If you encounter the warning for your own code, that means something else is triggering translation loading even before
init
.The above blog post has some guidance on how to debug the issue, for example using Query Monitor or a snippet like this to find the root cause: