• Resolved Bjarne Oldrup

    (@oldrup)


    Hey! Thank you for this trusted and robust plugin ??

    I’m testing it with WordPress 6.7 RC1, WP_DEBUG enabled, and I get the following warning in the admin dashboard when enabling UpdraftPlus

    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 the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/mkjqekzy/public_html/wp-includes/functions.php on line 6087

    A similar warning with maybe a hint for a resolution:

    https://github.com/pluginkollektiv/antispam-bee/issues/625

    Is that something you can reproduce?

Viewing 15 replies - 1 through 15 (of 17 total)
  • Plugin Support vupdraft

    (@vupdraft)

    Hi,

    This looks to be a bug with version of WP you are using: https://core.trac.www.ads-software.com/ticket/62175

    Plugin Author David Anderson

    (@davidanderson)

    Hi Bjarne,

    I don’t get this when activating UD on WP 6.7 RC1; nor does the logging fragment at https://make.www.ads-software.com/core/2024/10/21/i18n-improvements-6-7/ log anything for me when I activate. (I have WP_DEBUG set to true). So, this is likely from some other plugin you have active that hooks into the plugin activation process. Does this happen to you if UD is the *only* plugin that is active?

    David

    Thread Starter Bjarne Oldrup

    (@oldrup)

    Hi again, sorry for the late reply.

    I just tested, and yes, it when updraft is the only plugin enabled.


    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 the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/mkjqekzy/public_html/wp-includes/functions.php on line 6087

    A week ago, this post regarding the core changes and the warning was posted.:

    Internationalization improvements in 6.7

    Happens to around of one quarter of the plugins installed, though, so it might be my installation that isn’t feeling that well. I’ll try and see if I can reproduce this on a fresh installation.

    Plugin Author David Anderson

    (@davidanderson)

    Hi Bjarne,

    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',
    static 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.

    I just got the same error (notice) this morning after updating my WordPress to the latest 6.7 final (not RC)version.

    It’s the same notice with Yoast SEO as well.

    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 the?init?action or later. Please see?Debugging in WordPress?for more information. (This message was added in version 6.7.0.) in?/var/www/vhosts/c***es.co.uk/httpdocs/wp-includes/functions.php?on line?6114

    Plugin Author David Anderson

    (@davidanderson)

    Hi tfrank77,

    To enable us to know what might be causing your issue, please provide the information requested in my most recent post.

    David

    It’s not a bug in 6.7. It’s a feature, to point out that translations are loaded too early to use/ beingcalled for by __() etc (because the locale of the user not yet set).

    It’s a pain to fix BTW.

    1) Simple fix is if you are loading the text domain too early. init is the correct action.

    2) If that doesn’t fix it, then you have to trawl through all your uses of translation strings, to make sure they are not earlier than ‘init’ – took me hours on one of my plugins.

    • This reply was modified 1 week, 2 days ago by andy_moyle.
    Plugin Author David Anderson

    (@davidanderson)

    As per previous replies, this message does not occur on a default install for me or any of my colleagues who have tested, and thus some particular factor that does not occur in our setups is involved for you.

    To address your report properly, please supply the necessary information requested in my previous post, which will then help us to see what that factor is.

    Please can nobody else post in this thread unless they are providing the requested information. I am already more than familiar with the changes in WordPress core, their intentions, consequences, different strategies for addressing such a PHP notice, etc etc.

    I used your snippet David, and here is the full result (looks lovely ?? ):

    0 /var/www/vhosts/cs.co.uk/httpdocs/wp-includes/class-wp-hook.php(326): Code_Snippets_Manager::{closure}(‘…’) #1 /var/www/vhosts/cs.co.uk/httpdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(”, Array) #2 /var/www/vhosts/cs.co.uk/httpdocs/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #3 /var/www/vhosts/cs.co.uk/httpdocs/wp-includes/functions.php(6003): do_action(‘…’, ‘…’, ‘…’, ‘…’) #4 /var/www/vhosts/cs.co.uk/httpdocs/wp-includes/l10n.php(1347): doing_it_wrong(‘…’, ‘…’, ‘…’) #5 /var/www/vhosts/cs.co.uk/httpdocs/wp-includes/l10n.php(1385): _load_textdomain_just_in_time(‘…’) #6 /var/www/vhosts/cs.co.uk/httpdocs/wp-includes/l10n.php(194): get_translations_for_domain(‘…’) #7 /var/www/vhosts/cs.co.uk/httpdocs/wp-includes/l10n.php(306): translate(‘…’, ‘…’) #8 /var/www/vhosts/cs.co.uk/httpdocs/wp-content/plugins/updraftplus/central/translations-central.php(7): _(‘…’, ‘…’) #9 /var/www/vhosts/cs.co.uk/httpdocs/wp-content/plugins/updraftplus/central/updraftplus.php(273): include_once(‘…’) #10 /var/www/vhosts/cs.co.uk/httpdocs/wp-content/plugins/updraftplus/central/updraftplus.php(43): UpdraftPlus_Host->maybe_initialize_required_objects() #11 /var/www/vhosts/cs.co.uk/httpdocs/wp-content/plugins/updraftplus/central/updraftplus.php(29): UpdraftPlus_Host->__construct() #12 /var/www/vhosts/cs.co.uk/httpdocs/wp-content/plugins/updraftplus/central/factory.php(67): UpdraftPlus_Host::instance() #13 /var/www/vhosts/cs.co.uk/httpdocs/wp-content/plugins/updraftplus/central/factory.php(77): UpdraftCentral_Factory::create_host() #14 /var/www/vhosts/cs.co.uk/httpdocs/wp-content/plugins/updraftplus/updraftplus.php(104): include_once(‘…’) #15 /var/www/vhosts/cs.co.uk/httpdocs/wp-content/plugins/updraftplus/class-updraftplus.php(769): updraft_try_include_file(‘…’, ‘…’) #16 /var/www/vhosts/cs.co.uk/httpdocs/wp-includes/class-wp-hook.php(324): UpdraftPlus->plugins_loaded(”) #17 /var/www/vhosts/cs.co.uk/httpdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #18 /var/www/vhosts/cs.co.uk/httpdocs/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #19 /var/www/vhosts/cs.co.uk/httpdocs/wp-settings.php(559): do_action(‘…’) #20 /var/www/vhosts/cs.co.uk/httpdocs/wp-config.php(82): require_once(‘…’) #21 /var/www/vhosts/cs.co.uk/httpdocs/wp-load.php(50): require_once(‘…’) #22 /var/www/vhosts/cs.co.uk/httpdocs/wp-admin/admin.php(34): require_once(‘…’) #23 /var/www/vhosts/cs.co.uk/httpdocs/wp-admin/post.php(12): require_once(‘…’)

    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 the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/vhosts/c***s.co.uk/httpdocs/wp-includes/functions.php on line 6114 0 /var/www/vhosts/cs.co.uk/httpdocs/wp-includes/class-wp-hook.php(326): Code_Snippets_Manager::{closure}(‘…’) #1 /var/www/vhosts/cs.co.uk/httpdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(”, Array) #2 /var/www/vhosts/cs.co.uk/httpdocs/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #3 /var/www/vhosts/cs.co.uk/httpdocs/wp-includes/functions.php(6003): do_action(‘…’, ‘…’, ‘…’, ‘…’) #4 /var/www/vhosts/cs.co.uk/httpdocs/wp-includes/l10n.php(1347): doing_it_wrong(‘…’, ‘…’, ‘…’) #5 /var/www/vhosts/cs.co.uk/httpdocs/wp-includes/l10n.php(1385): _load_textdomain_just_in_time(‘…’) #6 /var/www/vhosts/cs.co.uk/httpdocs/wp-includes/l10n.php(194): get_translations_for_domain(‘…’) #7 /var/www/vhosts/cs.co.uk/httpdocs/wp-includes/l10n.php(306): translate(‘…’, ‘…’) #8 /var/www/vhosts/cs.co.uk/httpdocs/wp-content/plugins/wordpress-seo/inc/options/class-wpseo-option-titles.php(272): _(‘…’, ‘…’) #9 /var/www/vhosts/cs.co.uk/httpdocs/wp-content/plugins/wordpress-seo/inc/options/class-wpseo-option.php(404): WPSEO_Option_Titles->translate_defaults() #10 /var/www/vhosts/cs.co.uk/httpdocs/wp-content/plugins/wordpress-seo/inc/options/class-wpseo-option.php(726): WPSEO_Option->get_defaults() #11 /var/www/vhosts/cs.co.uk/httpdocs/wp-content/plugins/wordpress-seo/inc/options/class-wpseo-option.php(446): WPSEO_Option->array_filter_merge(Array) #12 /var/www/vhosts/cs.co.uk/httpdocs/wp-includes/class-wp-hook.php(326): WPSEO_Option->get_option(Array) #13 /var/www/vhosts/cs.co.uk/httpdocs/wp-includes/plugin.php(205): WP_Hook->apply_filters(Array, Array) #14 /var/www/vhosts/cs.co.uk/httpdocs/wp-includes/option.php(247): apply_filters(‘…’, Array, ‘…’) #15 /var/www/vhosts/cs.co.uk/httpdocs/wp-content/plugins/wordpress-seo/inc/options/class-wpseo-options.php(258): get_option(‘…’) #16 /var/www/vhosts/cs.co.uk/httpdocs/wp-content/plugins/wordpress-seo/inc/options/class-wpseo-options.php(235): WPSEO_Options::get_option(‘…’) #17 /var/www/vhosts/cs.co.uk/httpdocs/wp-content/plugins/wordpress-seo/inc/options/class-wpseo-options.php(218): WPSEO_Options::get_options(Array) #18 /var/www/vhosts/cs.co.uk/httpdocs/wp-content/plugins/wordpress-seo/inc/options/class-wpseo-options.php(303): WPSEO_Options::get_all() #19 /var/www/vhosts/cs.co.uk/httpdocs/wp-content/plugins/wordpress-seo/inc/options/class-wpseo-options.php(279): WPSEO_Options::prime_cache() #20 /var/www/vhosts/cs.co.uk/httpdocs/wp-content/plugins/wordpress-seo/inc/class-wpseo-meta.php(243): WPSEO_Options::get(‘…’, false) #21 /var/www/vhosts/cs.co.uk/httpdocs/wp-content/plugins/wordpress-seo/wp-seo-main.php(342): WPSEO_Meta::init() #22 /var/www/vhosts/cs.co.uk/httpdocs/wp-includes/class-wp-hook.php(324): wpseo_init(”) #23 /var/www/vhosts/cs.co.uk/httpdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #24 /var/www/vhosts/cs.co.uk/httpdocs/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #25 /var/www/vhosts/cs.co.uk/httpdocs/wp-settings.php(559): do_action(‘…’) #26 /var/www/vhosts/cs.co.uk/httpdocs/wp-config.php(82): require_once(‘…’) #27 /var/www/vhosts/cs.co.uk/httpdocs/wp-load.php(50): require_once(‘…’) #28 /var/www/vhosts/cs.co.uk/httpdocs/wp-admin/admin.php(34): require_once(‘…’) #29 /var/www/vhosts/cs.co.uk/httpdocs/wp-admin/post.php(12): require_once(‘…’)

    Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wordpress-seo 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 /var/www/vhosts/c***s.co.uk/httpdocs/wp-includes/functions.php on line 6114

    As you can see, not only your plugin has this issue, with the new WP update…

    Plugin Author David Anderson

    (@davidanderson)

    @tfrank77 Thank you. You have a code snippet in “Code Snippets Manager” which is running early and is calling UpdraftPlus code.

    So, that’s where the problem is originating. What is your code snippet, out of interest?

    Not really, I just used that plugin to insert your snippet.
    But here we go, the error message after I deactivated the snippet manager and used your snippet as a mu-plugin:

    0 /var/www/vhosts/c_s.co.uk/httpdocs/wp-includes/class-wp-hook.php(326): {closure}(‘…’) #1 /var/www/vhosts/c_s.co.uk/httpdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(”, Array) #2 /var/www/vhosts/c_s.co.uk/httpdocs/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #3 /var/www/vhosts/c_s.co.uk/httpdocs/wp-includes/functions.php(6003): do_action(‘…’, ‘…’, ‘…’, ‘…’) #4 /var/www/vhosts/c_s.co.uk/httpdocs/wp-includes/l10n.php(1347): doing_it_wrong(‘…’, ‘…’, ‘…’) #5 /var/www/vhosts/c_s.co.uk/httpdocs/wp-includes/l10n.php(1385): _load_textdomain_just_in_time(‘…’) #6 /var/www/vhosts/c_s.co.uk/httpdocs/wp-includes/l10n.php(194): get_translations_for_domain(‘…’) #7 /var/www/vhosts/c_s.co.uk/httpdocs/wp-includes/l10n.php(306): translate(‘…’, ‘…’) #8 /var/www/vhosts/c_s.co.uk/httpdocs/wp-content/plugins/updraftplus/central/translations-central.php(7): _(‘…’, ‘…’) #9 /var/www/vhosts/c_s.co.uk/httpdocs/wp-content/plugins/updraftplus/central/updraftplus.php(273): include_once(‘…’) #10 /var/www/vhosts/c_s.co.uk/httpdocs/wp-content/plugins/updraftplus/central/updraftplus.php(43): UpdraftPlus_Host->maybe_initialize_required_objects() #11 /var/www/vhosts/c_s.co.uk/httpdocs/wp-content/plugins/updraftplus/central/updraftplus.php(29): UpdraftPlus_Host->__construct() #12 /var/www/vhosts/c_s.co.uk/httpdocs/wp-content/plugins/updraftplus/central/factory.php(67): UpdraftPlus_Host::instance() #13 /var/www/vhosts/c_s.co.uk/httpdocs/wp-content/plugins/updraftplus/central/factory.php(77): UpdraftCentral_Factory::create_host() #14 /var/www/vhosts/c_s.co.uk/httpdocs/wp-content/plugins/updraftplus/updraftplus.php(104): include_once(‘…’) #15 /var/www/vhosts/c_s.co.uk/httpdocs/wp-content/plugins/updraftplus/class-updraftplus.php(769): updraft_try_include_file(‘…’, ‘…’) #16 /var/www/vhosts/c_s.co.uk/httpdocs/wp-includes/class-wp-hook.php(324): UpdraftPlus->plugins_loaded(”) #17 /var/www/vhosts/c_s.co.uk/httpdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #18 /var/www/vhosts/c_s.co.uk/httpdocs/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #19 /var/www/vhosts/c_s.co.uk/httpdocs/wp-settings.php(559): do_action(‘…’) #20 /var/www/vhosts/c_s.co.uk/httpdocs/wp-config.php(82): require_once(‘…’) #21 /var/www/vhosts/c_s.co.uk/httpdocs/wp-load.php(50): require_once(‘…’) #22 /var/www/vhosts/c_s.co.uk/httpdocs/wp-admin/admin.php(34): require_once(‘…’) #23 /var/www/vhosts/c_s.co.uk/httpdocs/wp-admin/plugins.php(10): require_once(‘…’)

    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 the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/vhosts/c_s.co.uk/httpdocs/wp-includes/functions.php on line 6114

    Small note: There was no other plugin activated on the site, only UpdraftPlus.

    Hi,

    Please note that this issue is still not resolved. I also experience it after updating to WordPress 6.7.

    I use UpdraftPlus on multiple websites and just one of them is throwing the error: the one that is not in English.

    So, I think you need to switch WordPress to a different language (maybe try British English) to throw the error. With default US English WordPress installation there is no error thrown (at least for me).

    I’ve tried to fix this directly in UpdraftPlus plugin’s code by removing the load_plugin_textdomain() call, but it didn’t help.

    I think the comment by @andy_moyle provides more info about the cause of the issue – see his point #2 in the comment. It seems UpdraftPlus is using internationalization functions in its code too early for WordPress 6.7, before init action hook is triggered.

    Hope this info helps with debugging and resolving the issue.

    Plugin Author David Anderson

    (@davidanderson)

    Once more, please do not post in this thread unless you’re posting the requested information (which has now been provided by tfrank777, so unless you have a different stack trace, there’s no need to duplicate that either).

    One more thing: when I switch the affected website back to default English language, the error no longer displays. So it really seems to be related to using different language in WordPress.

Viewing 15 replies - 1 through 15 (of 17 total)
  • You must be logged in to reply to this topic.