• Resolved danielspain

    (@danielspain)


    After upgrading Loco to 2.6.8(worked fine in 2.6.7) i’m getting tons of this error in my logs:

    [08-May-2024 16:12:38 UTC] [Loco.debug] “The “default” text domain isn’t loaded. “es_ES” translations may fail” in src/hooks/LoadHelper.php:207 [08-May-2024 16:12:38 UTC] [Loco.debug] “> __(“put your unique phrase here”) called” in ../../../wp-includes/pluggable.php:2450

    and then, for different plugins(just an example of a couple):

    “The “captcha-4wp” text domain isn’t loaded. “es_ES” translations may fail” in src/hooks/LoadHelper.php:207 [08-May-2024 16:13:13 UTC] [Loco.debug] “> __(“Get Premium!”,”captcha-4wp”) called” in ../advanced-nocaptcha-recaptcha/includes/class-c4wp-functions.php:646

    [08-May-2024 16:13:23 UTC] [Loco.debug] “The “jetpack-connection” text domain isn’t loaded. “es_ES” translations may fail” in src/hooks/LoadHelper.php:207 [08-May-2024 16:09:13 UTC] [Loco.debug] “> esc_html__(“You do not have the correct user permissions to perform this action.\n\t\t\tPlease contact your site admin if you think this is a mistake.”,”jetpack-connection”) called” in ../woocommerce/vendor/automattic/jetpack-connection/src/class-rest-connector.php:58

    and finally, for all plugins:

    [08-May-2024 16:14:31 UTC] [Loco.debug] “Text domain loaded prematurely, unloaded “maintenance”” in src/hooks/LoadHelper.php:65 [08-May-2024 16:24:31 UTC] [Loco.debug] “Text domain loaded prematurely, unloaded “wp-security-audit-log”” in src/hooks/LoadHelper.php:65 [08-May-2024 16:24:31 UTC] [Loco.debug] “Text domain loaded prematurely, unloaded “duplicator”” in src/hooks/LoadHelper.php:65 [08-May-2024 16:24:31 UTC] [Loco.debug] “Text domain loaded prematurely, unloaded “prevent-browser-caching”” in src/hooks/LoadHelper.php:65 [08-May-2024 16:24:31 UTC] [Loco.debug] “Text domain loaded prematurely, unloaded “user-role-editor”” in src/hooks/LoadHelper.php:65 [08-May-2024 16:24:31 UTC] [Loco.debug] “Text domain loaded prematurely, unloaded “mobbex-for-woocommerce”” in src/hooks/LoadHelper.php:65 [08-May-2024 16:24:31 UTC] [Loco.debug] “Text domain loaded prematurely, unloaded “wps-hide-login”” in src/hooks/LoadHelper.php:65 [08-May-2024 16:24:31 UTC] [Loco.debug] “Text domain loaded prematurely, unloaded “default”” in src/hooks/LoadHelper.php:65 [08-May-2024 16:24:31 UTC] [Loco.debug] “Text domain loaded prematurely, unloaded “neve”” in src/hooks/LoadHelper.php:65 [08-May-2024 16:24:31 UTC] [Loco.debug] “Text domain loaded prematurely, unloaded “woocommerce”” in src/hooks/LoadHelper.php:65 [08-May-2024 16:24:31 UTC] [Loco.debug] “Text domain loaded prematurely, unloaded “contact-form-7″” in src/hooks/LoadHelper.php:65 [08-May-2024 16:24:31 UTC] [Loco.debug] “Text domain loaded prematurely, unloaded “wp-crontrol”” in src/hooks/LoadHelper.php:65 [08-May-2024 16:24:31 UTC] [Loco.debug] “Text domain loaded prematurely, unloaded “wp-mail-smtp”” in src/hooks/LoadHelper.php:65 [08-May-2024 16:24:31 UTC] [Loco.debug] “Text domain loaded prematurely, unloaded “advanced-nocaptcha-recaptcha”” in src/hooks/LoadHelper.php:65 [08-May-2024 16:24:31 UTC] [Loco.debug] “Text domain loaded prematurely, unloaded “plugin-update-checker”” in src/hooks/LoadHelper.php:65 [08-May-2024 16:24:31 UTC] [Loco.debug] “Text domain loaded prematurely, unloaded “woo-order-export-lite”” in src/hooks/LoadHelper.php:65 [08-May-2024 16:24:31 UTC] [Loco.debug] “Text domain loaded prematurely, unloaded “adminimize”” in src/hooks/LoadHelper.php:65 [08-May-2024 16:24:31 UTC] [Loco.debug] “Text domain loaded prematurely, unloaded “contact-form-7-honeypot”” in src/hooks/LoadHelper.php:65 [08-May-2024 16:24:31 UTC] [Loco.debug] “Text domain loaded prematurely, unloaded “wpfront-notification-bar”” in src/hooks/LoadHelper.php:65 [08-May-2024 16:24:31 UTC] [Loco.debug] “Text domain loaded prematurely, unloaded “enable-jquery-migrate-helper”” in src/hooks/LoadHelper.php:65 [08-May-2024 16:24:31 UTC] [Loco.debug] “Text domain loaded prematurely, unloaded “loco-translate”” in src/hooks/LoadHelper.php:65 [08-May-2024 16:24:31 UTC] [Loco.debug] “The “default” text domain isn’t loaded. “es_ES” translations may fail” in src/hooks/LoadHelper.php:207

    We didn’t change or update any plugin but Loco, and it worked fine until this upgrade, with no error logs ever….please help us, thanks in advance!

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Tim W

    (@timwhitlock)

    This was added to catch the kind of problems that people report on this forum every day.

    If you don’t want to log debug messages, disable WP_DEBUG. Currently this is the only way to avoid the debug messages, but it’s evidently annoying people, so I’ll be looking at making it optional.

    I am curious however, about the second last message, that loco-translate was loaded prematurely. Being my own plugin I don’t know how that can happen.

    Thread Starter danielspain

    (@danielspain)

    yes, this would be very helpful!!!!!! please make it optional, it causes debugging of other problems non related to loco very very hard cause the log is huge. Some hostings force the writing of log files in production sites, even when wp debug is off, so it would be really really awesome to make this optional, i hope you could come with a patch or new version soon, thanks a lot!

    Plugin Author Tim W

    (@timwhitlock)

    Actually the unloaded message can be avoided with a filter. loco_unload_premature_domain

    Disabling WP_DEBUG will prevent these logs, as I commented in the other thread.

    Thread Starter danielspain

    (@danielspain)

    thanks, but how could i patch the plugin to avoid all the debug logs in the meantime until you could make it optional?…or how can i add custom code in my functions.php to avoid the logging with the filter? It would be very helpful to make all this logs optional…thakns again

    Plugin Author Tim W

    (@timwhitlock)

    as per the other thread. This is hookable now instead. Live tomorrow when I’ve had a chance to test it more.

    I was able to disable the logs by renaming the WP_DEBUG constant to WP_DEBUG_LOCO in LoadHelper.php and Hookable.php and then defining WP_DEBUG_LOCO as false in wp-config.php.

    At least until the next version is released.

    Getting this too after last version on one of our websites :

    Warning: Undefined array key “file” in?/home/domain/public_html/wp-content/plugins/loco-translate/src/hooks/LoadHelper.php?on line?212

    Deprecated: substr(): Passing null to parameter #1 ($string) of type string is deprecated in?/home/domain/public_html/wp-content/plugins/loco-translate/src/hooks/LoadHelper.php?on line?212

    Warning: Undefined array key “file” in?/home/domain/public_html/wp-content/plugins/loco-translate/src/error/Exception.php?on line?97

    Warning: Undefined array key “line” in?/home/domain/public_html/wp-content/plugins/loco-translate/src/error/Exception.php?on line?98

    Plugin Author Tim W

    (@timwhitlock)

    @jadim Thanks for the heads up. The code doing this has already been removed in the dev version.

    Thread Starter danielspain

    (@danielspain)

    thanks for the fix!!, 2.6.9 no longer write any log!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘huge error logs after 2.6.8 upgrade’ is closed to new replies.