PHP Notice
-
We are seeing the following PHP notice in our error logs:
PHP Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the w3-total-cache 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 /{PATH}/wp-includes/functions.php on line 6170-
This topic was modified 4 days, 7 hours ago by
afwebdev.
-
This topic was modified 4 days, 7 hours ago by
-
Hello @afwebdev
Thank you for reaching out and I am happy to help!
If you’re seeing this notice while using the latest version of W3 Total Cache, please let me know:
- WordPress version
- W3 Total Cache version
- PHP version
- Whether the notice appears immediately after activating the plugin or only during a specific action
I’ll be happy to investigate further. If this is occurring on the latest release, it may indicate a translation-loading issue that needs to be addressed in a future update.
Thanks!
Thanks for the reply. Here is the info you requested:
WordPress: Version 7.0.2
W3 Total Cache: Version 2.10.2
PHP: Version 8.5.6
I enabled the XDebug extension to get a trace on the error. It looks to me like it’s occurring when a 403 Forbidden page is presented, which would explain why I couldn’t figure out how to trigger it. Here is the relevant log entry:
[23-Jul-2026 22:05:35 UTC] PHP Notice: Function _load_textdomain_just_in_time was called <strong>incorrectly</strong>. Translation loading for the <code>w3-total-cache</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.wordpress.org/advanced-administration/debug/debug-wordpress/">Debugging in WordPress</a> for more information. (This message was added in version 6.7.0.) in /{PATH}/wp-includes/functions.php on line 6170
[23-Jul-2026 22:05:35 UTC] PHP Stack trace:
[23-Jul-2026 22:05:35 UTC] PHP 1. shutdown_action_hook() /{PATH}/wp-includes/load.php:0
[23-Jul-2026 22:05:35 UTC] PHP 2. do_action($hook_name = 'shutdown') /{PATH}/wp-includes/load.php:1308
[23-Jul-2026 22:05:35 UTC] PHP 3. WP_Hook->do_action($args = [0 => '']) /{PATH}/wp-includes/plugin.php:522
[23-Jul-2026 22:05:35 UTC] PHP 4. WP_Hook->apply_filters($value = '', $args = [0 => '']) /{PATH}/wp-includes/class-wp-hook.php:365
[23-Jul-2026 22:05:35 UTC] PHP 5. wp_ob_end_flush_all('') /{PATH}/wp-includes/class-wp-hook.php:341
[23-Jul-2026 22:05:35 UTC] PHP 6. ob_end_flush() /{PATH}/wp-includes/functions.php:5493
[23-Jul-2026 22:05:35 UTC] PHP 7. W3TC\Generic_Plugin->ob_callback($buffer = '<!DOCTYPE html>\n<html>\n<head>\n\t<title>403 Forbidden</title>\n\t<style>\n\t\thtml {\n\t\t\tfont-family: "Helvetica Neue", Helvetica, Arial, sans-serif;\n\t\t\tfont-size: 0.875rem;\n\t\t\tline-height: 1.42857143;\n\t\t\tcolor: #333;\n\t\t\tbackground-color: #fff;\n\t\t\tpadding: 0;\n\t\t\tmargin: 0;\n\t\t}\n\n\t\tbody {\n\t\t\tpadding: 0;\n\t\t\tmargin: 0;\n\t\t}\n\n\t\ta {\n\t\t\tcolor:#00709e;\n\t\t}\n\n\t\th1, h2, h3, h4, h5, h6 {\n\t\t\tfont-weight: 200;\n\t\t\tline-height: 1.1;\n\t\t}\n\n\t\th1, .h1 { font-size: 3rem; }\n\t\th2, .h2 { font-size: 2.5rem; }\n\t\th3, .h3 { font-size: 1.5rem; '..., 9) /{PATH}/wp-includes/functions.php:5493
[23-Jul-2026 22:05:35 UTC] PHP 8. apply_filters($hook_name = 'w3tc_footer_comment', $value = [0 => 'Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin', 1 => '']) /{PATH}/wp-content/plugins/w3-total-cache/Generic_Plugin.php:964
[23-Jul-2026 22:05:35 UTC] PHP 9. WP_Hook->apply_filters($value = [0 => 'Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin', 1 => ''], $args = [0 => [0 => 'Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin', 1 => '']]) /{PATH}/wp-includes/plugin.php:205
[23-Jul-2026 22:05:35 UTC] PHP 10. W3TC\PgCache_ContentGrabber->w3tc_footer_comment($strings = [0 => 'Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin', 1 => '']) /{PATH}/wp-includes/class-wp-hook.php:341
[23-Jul-2026 22:05:35 UTC] PHP 11. __($text = 'Page Caching using %1$s%2$s%3$s', $domain = 'w3-total-cache') /{PATH}/wp-content/plugins/w3-total-cache/PgCache_ContentGrabber.php:1813
[23-Jul-2026 22:05:35 UTC] PHP 12. translate($text = 'Page Caching using %1$s%2$s%3$s', $domain = 'w3-total-cache') /{PATH}/wp-includes/l10n.php:307
[23-Jul-2026 22:05:35 UTC] PHP 13. get_translations_for_domain($domain = 'w3-total-cache') /{PATH}/wp-includes/l10n.php:195
[23-Jul-2026 22:05:35 UTC] PHP 14. _load_textdomain_just_in_time($domain = 'w3-total-cache') /{PATH}/wp-includes/l10n.php:1483
[23-Jul-2026 22:05:35 UTC] PHP 15. _doing_it_wrong($function_name = '_load_textdomain_just_in_time', $message = 'Translation loading for the <code>w3-total-cache</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') /{PATH}/wp-includes/l10n.php:1445
[23-Jul-2026 22:05:35 UTC] PHP 16. wp_trigger_error($function_name = '', $message = 'Function _load_textdomain_just_in_time was called <strong>incorrectly</strong>. Translation loading for the <code>w3-total-cache</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.wordpress.org/advanced-administration/debug/debug-wordpress/">Debugging in WordPress</a> for more information. (This message was added in version 6.7'..., $error_level = *uninitialized*) /{PATH}/wp-includes/functions.php:6084
[23-Jul-2026 22:05:35 UTC] PHP 17. trigger_error($message = 'Function _load_textdomain_just_in_time was called <strong>incorrectly</strong>. Translation loading for the <code>w3-total-cache</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.wordpress.org/advanced-administration/debug/debug-wordpress/">Debugging in WordPress</a> for more information. (This message was added in version 6.7'..., $error_level = 1024) /{PATH}/wp-includes/functions.php:6170Hello @afwebdev
Thank you for your feedback.
Is Debug enabled by any chance in Performance> General settings?
If so can you please disable it?Also, please let me know if the MInify is used?
Thanks!Debug is (and has been) disabled.
Minify is on “Combine and Minify” for JS & CSS only.
You must be logged in to reply to this topic.