• Resolved Bjarne Oldrup

    (@oldrup)


    Hey! Thank you for sharing this fine lightbox plugin with the community ??

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


    Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the easy-fancybox 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 7 replies - 1 through 7 (of 7 total)
  • Plugin Author FirelightWP

    (@firelightwp)

    @oldrup – Thanks for the report. For some reason, I’m not able to duplicate this error running WP 6.7 RC1 locally. But I should be. Looks like they did make a change to start emitting warnings if translations are loaded early.

    https://make.www.ads-software.com/core/2024/10/21/i18n-improvements-6-7/

    I’ll work on a fix and try to get this deployed soon.

    Plugin Author FirelightWP

    (@firelightwp)

    I just deployed a fix for this today. Thanks again for the report!

    Going to go ahead and mark this resolved.

    Wolf

    (@siteussia)

    Hi, I have the latest version 2.3.7, this error still exists.

    Notice: Function _load_textdomain_just_in_time was called?incorrectly. Translation loading for the?easy-fancybox?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.

    Plugin Author FirelightWP

    (@firelightwp)

    Hi @siteussia – I just double checked this and our plugin no longer calls or invokes the load_plugin_textdomain() function at all. For plugins hosted on www.ads-software.com, calling that method is no longer necessary, so the last release actually removed it – or to be precise, commented it out for now. The only appearance of the function in our code base is in a comment.

    Can you double check you are updated, and that you don’t have any kind of server side cache that might be serving an older version of the plugin?

    Wolf

    (@siteussia)

    Hello @FirelightWP. Have you tried switching wordpress to another language? ?? Not English ) I think the problem arises in other languages due to the fact that the translations of the plugins are not loaded.

    Anna Webdesign

    (@anna-webdesign)

    I have the same issue on a very old template (twenty thirteen):

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

    And its not on English – So maybe there is something in there?

    Plugin Author FirelightWP

    (@firelightwp)

    Hey all – I’m very familiar with the issue. It’s outlined here:
    https://make.www.ads-software.com/core/2024/10/21/i18n-improvements-6-7/

    To copy the relevant parts here:

    WordPress now warns developers if they are loading translations too early in a plugin or theme, before the current user is known. Existing functions like load_plugin_textdomain() and load_theme_textdomain() were updated to defer the actual loading to the existing just-in-time translation logic in core.

    And:

    Reminder: if your plugin or theme is hosted on www.ads-software.com and is still using load_*_textdomain(), you can remove this call. Since WordPress 4.6, plugins and themes no longer need load_plugin_textdomain() or load_theme_textdomain(). WordPress automatically loads the translations for you when needed.

    We did that second step, and removed these functions entirely from the code base. So the functions that trigger this warning simply *do not exist* in our plugin any more.

    Obviously that raises a question of how more than one of you is seeing the error. Right now, my guess is that the issue goes beyond what’s reported in the post above, and that if there’s any code trying to use any WordPress translation function before a certain point in WordPress execution sequence, it will still trigger the warning. I’ll check and see what may be going on there and follow up.

    Thanks again for posting here and raising the issue.

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