Not compatible with WP 6.7
-
Here’s the warning…
PHP Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the
updraftplus
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 /******/wp-includes/functions.php on line 6114Not simple to find! It’s not just enqueuing too early that causes it, any translation strings before init will trgger it too.
-
Same Problem here after upating to WP 6.7!
Also mentioned 2 weeks ago: https://www.ads-software.com/support/topic/wp-6-7-function-_load_textdomain_just_in_time-was-called-incorrectly/
Had to deactivate UpdraftPlus to get the page running ..- This reply was modified 1 week, 2 days ago by dietervoss.
Hi,
Since I’m not getting this message, something in your setup must trigger different parts of UpdraftPlus to what is being triggered in our testing. You should use the code fragment in the link above as an mu-plugin to get more information on the code path, and then post the result here:
<?php
add_action('doing_it_wrong_run', function ( $function_name ) {
if ( '_load_textdomain_just_in_time' === $function_name ) {
debug_print_backtrace();
error_log(wp_debug_backtrace_summary());
}
});Alternatively, installing the plugin “Query Monitor” should add the information to the panel in your WP dashboard so that you can read it from there.
Thank you,
DavidUsing Query Monitor with WP 6.7…
Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the updraftplus 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. (This message was added in version 6.7.0.)
_load_textdomain_just_in_time()
wp-includes/l10n.php:1355get_translations_for_domain()
wp-includes/l10n.php:1385translate()
wp-includes/l10n.php:194__()
wp-includes/l10n.php:306UpdraftPlus_Host->maybe_initialize_required_objects()
wp-content/plugins/updraftplus/central/updraftplus.php:273UpdraftPlus_Host->__construct()
wp-content/plugins/updraftplus/central/updraftplus.php:43UpdraftPlus_Host::instance()
wp-content/plugins/updraftplus/central/updraftplus.php:29UpdraftCentral_Factory::create_host()
wp-content/plugins/updraftplus/central/factory.php:67updraft_try_include_file()
wp-content/plugins/updraftplus/updraftplus.php:103UpdraftPlus->plugins_loaded()
wp-content/plugins/updraftplus/class-updraftplus.php:769do_action('plugins_loaded')
wp-includes/plugin.php:517
Here with Query Monitor:
_load_textdomain_just_in_time()
wp-includes/l10n.php:1355get_translations_for_domain()
wp-includes/l10n.php:1385translate()
wp-includes/l10n.php:194__()
wp-includes/l10n.php:306UpdraftPlus_Host->maybe_initialize_required_objects()
wp-content/plugins/updraftplus/central/updraftplus.php:273UpdraftPlus_Host->__construct()
wp-content/plugins/updraftplus/central/updraftplus.php:43UpdraftPlus_Host::instance()
wp-content/plugins/updraftplus/central/updraftplus.php:29UpdraftCentral_Factory::create_host()
wp-content/plugins/updraftplus/central/factory.php:67updraft_try_include_file()
wp-content/plugins/updraftplus/updraftplus.php:103UpdraftPlus->plugins_loaded()
wp-content/plugins/updraftplus/class-updraftplus.php:769do_action('plugins_loaded')
wp-includes/plugin.php:517
Plugin: updraftplusTotal: 1
Follow up – as noted in other thread, issue only occurs when Site langauge is not US English – try British English.
- This reply was modified 1 week, 2 days ago by andy_moyle.
Thank you. Someone is working on a fix.
Hi,
This is fixed in the just-released UD 1.24.8. Thanks for the info!
David
Hi @davidanderson,
I’m sorry, this is not fixed in UD 1.24.8. I just updated the plugin and the issue persists.
Have you tested the plugin update on WordPress with non-default English installation?
Please read our comments thoroughly so you can apply proper fix to the plugin code.
The fix is not only to move
load_plugin_textdomain()
toinit
hook (like you’ve correctly done in version 1.24.8), but you also need to update all your internationalization functions so they run at theinit
hook (as @andy_moyle mentioned in his comment and in the description of this particular support ticket too).As of now, the plugin is still not compatible with WordPress 6.7.
Thank you for working on the solution!
@webmandesign If you are having a problem, then please post the requested information. The notice that andy_moyle posted was reproduced in our testing on 1.24.7 on multiple testers’ installs (all of which were running on a non-en-US locale) and does not occur on any of the same sites in 1.24.8.
Repeatedly posting links to the general information on the technical background to the issue, which is already well understood by everyone, is not useful. Please post the actually requested specific information.
With WordPress 6.7 with Slovak language pack (
sk_SK
),
only UpdraftPlus 1.24.8 and Query Monitor 3.16.4 plugins installed (no MU plugins),
I get this “Doing it Wrong” notice from Query Monitor:Message: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the updraftplus 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. (This message was added in version 6.7.0.)
Caller:
_load_textdomain_just_in_time()
wp-includes/l10n.php:1355get_translations_for_domain()
wp-includes/l10n.php:1385translate()
wp-includes/l10n.php:194__()
wp-includes/l10n.php:306UpdraftPlus_Host->load_updraftplus_translations()
wp-content/plugins/updraftplus/central/updraftplus.php:281UpdraftPlus_Host->maybe_initialize_required_objects()
wp-content/plugins/updraftplus/central/updraftplus.php:272UpdraftPlus_Host->__construct()
wp-content/plugins/updraftplus/central/updraftplus.php:44UpdraftPlus_Host::instance()
wp-content/plugins/updraftplus/central/updraftplus.php:29UpdraftCentral_Factory::create_host()
wp-content/plugins/updraftplus/central/factory.php:67updraft_try_include_file()
wp-content/plugins/updraftplus/updraftplus.php:103UpdraftPlus->plugins_loaded()
wp-content/plugins/updraftplus/class-updraftplus.php:776do_action('plugins_loaded')
wp-includes/plugin.php:517
Component: Plugin: updraftplus
Should I open a new support ticket, or is this related to original support ticket here?
Thanks. We’ve now reproduced this (and in doing so learned why the fix fixed the issue on our testing setups and not on your site, due to some subtleties in WP’s translation loading code).
A release with a fix should be made later today – please update to it. If you see any further issues, please open a new thread to avoid sending further unwanted emails to andy_moyle.
Can confirm not fixed – you are still calling the translations in wp-content/plugins/updraftplus/central/updraftplus.php:281 at ‘plugins_loaded’ not ‘init’
wp-content/plugins/updraftplus/central/updraftplus.php:272 is shown in error stack at line 272 not 273, so something has chaged but still way too early.
Error on a production site with en_GB , language set.
_load_textdomain_just_in_time()
wp-includes/l10n.php:1355get_translations_for_domain()
wp-includes/l10n.php:1385translate()
wp-includes/l10n.php:194__()
wp-includes/l10n.php:306UpdraftPlus_Host->load_updraftplus_translations()
wp-content/plugins/updraftplus/central/updraftplus.php:281UpdraftPlus_Host->maybe_initialize_required_objects()
wp-content/plugins/updraftplus/central/updraftplus.php:272UpdraftPlus_Host->__construct()
wp-content/plugins/updraftplus/central/updraftplus.php:44UpdraftPlus_Host::instance()
wp-content/plugins/updraftplus/central/updraftplus.php:29UpdraftCentral_Factory::create_host()
wp-content/plugins/updraftplus/central/factory.php:67updraft_try_include_file()
wp-content/plugins/updraftplus/updraftplus.php:103UpdraftPlus->plugins_loaded()
wp-content/plugins/updraftplus/class-updraftplus.php:776do_action('plugins_loaded')
wp-includes/plugin.php:517
I’ve got something like this:
8 0.1047 4092848 WP_Hook->apply_filters( $value = '', $args = [0 => ''] ) .../class-wp-hook.php:348
9 0.1422 4637872 UpdraftPlus->plugins_loaded( '' ) .../class-wp-hook.php:324
10 0.1423 4648728 updraft_try_include_file( $path = 'central/factory.php', $method = 'include_once' ) .../class-updraftplus.php:769
11 0.1424 4649512 include_once( '/home/domains/domain/public_html/wp-content/plugins/updraftplus/central/factory.php ) .../updraftplus.php:103
12 0.1424 4649568 UpdraftCentral_Factory::create_host( ) .../factory.php:77
13 0.1427 4654168 UpdraftPlus_Host::instance( ) .../factory.php:67
14 0.1427 4654328 UpdraftPlus_Host->__construct( ) .../updraftplus.php:29
15 0.1427 4657704 UpdraftPlus_Host->maybe_initialize_required_objects( ) .../updraftplus.php:43
16 0.1428 4657960 include_once( '//home/domains/domain/public_html/wp-content/plugins/updraftplus/central/translations-central.php ) .../updraftplus.php:273
17 0.1428 4657960 __( $text = 'UpdraftCentral Connection', $domain = 'updraftplus' ) .../translations-central.php:7
18 0.1428 4657960 translate( $text = 'UpdraftCentral Connection', $domain = 'updraftplus' ) .../l10n.php:306
19 0.1428 4657960 get_translations_for_domain( $domain = 'updraftplus' ) .../l10n.php:194
20 0.1428 4657960 _load_textdomain_just_in_time( $domain = 'updraftplus' ) .../l10n.php:1385
21 0.1428 4659448 _doing_it_wrong( $function_name = '_load_textdomain_just_in_time', $message = 'Translation loading for the <code>updraftplus</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.', $version = '6.7.0' ) .../l10n.php:1355
22 0.1429 4660792 wp_trigger_error( $function_name = '', $message = 'Function _load_textdomain_just_in_time was called <strong>incorrectly</strong>. Translation loading for the <code>updraftplus</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.www.ads-software.com/advanced-administration/debug/debug-wordpress/">Debugging in WordPress</a> for more information. (This message was added in version 6.7.0.'..., $error_level = ??? ) .../functions.php:6054
23 0.1431 4660096 trigger_error( $message = 'Function _load_textdomain_just_in_time was called <strong>incorrectly</strong>. Translation loading for the <code>updraftplus</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.www.ads-software.com/advanced-administration/debug/debug-wordpress/">Debugging in WordPress</a> for more information. (This message was added in version 6.7.0.'..., $error_type = 1024 ) .../functions.php:6114Turning plugin off helps to remove errors.
Thank you for such a fast fix update!
After updating to UD 1.24.9 the issue seems to be fixed. I no longer experience the
_load_textdomain_just_in_time
notice.
- You must be logged in to reply to this topic.