• Hi,

    Using latest version of WP 6.7 and latest version of plugin 7.5.1 gives the following notice :

    Notice: Function _load_textdomain_just_in_time was called?incorrectly. Translation loading for the?restricted-site-access?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?…/wp-includes/functions.php?on line?6114

    Could you please fix this by loading the textdomain in an init hook in next release ?

    Thank you

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Ankit K Gupta

    (@ankit-k-gupta)

    Hello @inovagora,

    Thank you for reaching out! The warning you reported related to _load_textdomain_just_in_time has been fixed in the latest WordPress 6.7.1.

    Please update to the latest version and let us know if you continue to experience any issues with this plugin.

    Thank you!

    Thread Starter inovagora

    (@inovagora)

    Hello @ankit-k-gupta,

    Thank you for your fast answer.

    Sadly the issue is still present with WodPress 6.7.1, the notice still appears.

    Plugin Contributor Jeffrey Paul

    (@jeffpaul)

    @inovagora our team has tested with WordPress 6.7.1 and RSA 7.5.1 and the notice is no longer appearing. Can you confirm your Site Health Info as it sounds like you’ve got either another plugin that’s causing this or perhaps a WP config that we’ve not yet accounted for?

    Thread Starter inovagora

    (@inovagora)

    @jeffpaul thank you, i’ve deployed a stock WordPress 6.7.1 with RSA 7.5.1 and you’re right, there is no notice displayed.

    I will try to find out why there is a notice displaying on the other site I’m developing and keep you up to date if I find something. (can’t share site health infos for confidentiality issues)

    hupe13

    (@hupe13)

    Today I installed RSA 7.5.1 on WP 6.7.1 on a multisite. I activated the plugin on a german website and I get this notice too (message from Query Monitor):

        _load_textdomain_just_in_time()
    wp-includes/l10n.php:1370
    get_translations_for_domain()
    wp-includes/l10n.php:1408
    translate()
    wp-includes/l10n.php:194
    esc_html__()
    wp-includes/l10n.php:339
    Restricted_Site_Access::populate_fields_array()
    wp-content/plugins/restricted-site-access/restricted_site_access.php:272
    Restricted_Site_Access::get_instance()
    wp-content/plugins/restricted-site-access/restricted_site_access.php:115

    Query Monitor seems to have a similar problem, but the notice appears in debug log too, if I deactivate Query Monitor.

    • This reply was modified 3 months ago by hupe13.
    Thread Starter inovagora

    (@inovagora)

    Hi @ankit-k-gupta and @jeffpaul

    I was able to reproduce the issue, as shown by the log from @hupe13 the issue comes as follow :

    • the plugin is loaded, with its file restricted_site_access.php
    • the file contains the line “Restricted_Site_Access::get_instance();” which gets executed
    • get_instance calls “self::populate_fields_array();”
    • populate_fileds_array loads a translation with “esc_html__( ‘Handle restricted visitors’, ‘restricted-site-access’ )”

    Problem, this happens before the init hook, thus producing the self-explicit notice :

    Notice: Function _load_textdomain_just_in_time was called?incorrectly. Translation loading for the?restricted-site-access?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/user/sites/duplicable/novacity-starter-duplicable.dev.inovagora.work/wp-includes/functions.php?on line?6114

    Can you please check again to fix this ?

    Maybe “Restricted_Site_Access::get_instance();” should be called in an init hook ?

    Thank you

    Plugin Support Ankit K Gupta

    (@ankit-k-gupta)

    Hello @inovagora and @hupe13,

    Thank you for providing details to reproduce the issue. We truly appreciate your efforts.

    I can reproduce this issue on a WordPress multisite network. I’ve reported it on the bug tracker for resolution with priority.

    You can track the progress and updates on the issue here.

    Thanks again for your contributions and patience!

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