Skip to content

i18n Warning on Brand New Site #2990

@brianhogg

Description

@brianhogg

Reproduction Steps

  1. Install LifterLMS on a brand new site, with WP_DEBUG and WP_DEBUG_DISPLAY turned on

Expected Behavior

No warning

Actual Behavior

Warning is shown about early translation loading.

Error Messages / Logs


( ! ) Notice: Function _load_textdomain_just_in_time was called <strong>incorrectly</strong>. Translation loading for the <code>lifterlms</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 /Users/brianhogg/Local Sites/llms-test/app/public/wp-includes/functions.php on line 6121
--


1 | 0.0076 | 374640 | {main}( ) | .../plugins.php:0
2 | 0.0076 | 381552 | require_once( '/Users/brianhogg/Local Sites/llms-test/app/public/wp-admin/admin.php ) | .../plugins.php:10
3 | 0.0076 | 382384 | require_once( '/Users/brianhogg/Local Sites/llms-test/app/public/wp-load.php ) | .../admin.php:35
4 | 0.0076 | 382984 | require_once( '/Users/brianhogg/Local Sites/llms-test/app/public/wp-config.php ) | .../wp-load.php:50
5 | 0.0076 | 391960 | require_once( '/Users/brianhogg/Local Sites/llms-test/app/public/wp-settings.php ) | .../wp-config.php:107
6 | 0.0160 | 3096664 | do_action( $hook_name = 'plugins_loaded' ) | .../wp-settings.php:578
7 | 0.0160 | 3096880 | WP_Hook->do_action( $args = [0 => ''] ) | .../plugin.php:517
8 | 0.0160 | 3096880 | WP_Hook->apply_filters( $value = '', $args = [0 => ''] ) | .../class-wp-hook.php:348
9 | 0.0197 | 3199424 | LifterLMS_Helper->init( '' ) | .../class-wp-hook.php:324
10 | 0.0209 | 3290608 | LifterLMS_Helper->crons( ) | .../class-lifterlms-helper.php:101
11 | 0.0210 | 3292168 | wp_schedule_event( $timestamp = 1755603343, $recurrence = 'daily', $hook = 'llms_helper_check_license_keys', $args = ???, $wp_error = ??? ) | .../class-lifterlms-helper.php:121
12 | 0.0210 | 3292168 | wp_get_schedules( ) | .../cron.php:247
13 | 0.0210 | 3294048 | apply_filters( $hook_name = 'cron_schedules', $value = [] ) | .../cron.php:1136
14 | 0.0210 | 3294296 | WP_Hook->apply_filters( $value = [], $args = [0 => []] ) | .../plugin.php:205
15 | 0.0210 | 3294944 | LLMS_Sessions->add_cron_schedule( $schedules = [] ) | .../class-wp-hook.php:324
16 | 0.0210 | 3295320 | __( $text = 'Every %d Minutes', $domain = 'lifterlms' ) | .../class-llms-sessions.php:74
17 | 0.0210 | 3295320 | translate( $text = 'Every %d Minutes', $domain = 'lifterlms' ) | .../l10n.php:307
18 | 0.0210 | 3295320 | get_translations_for_domain( $domain = 'lifterlms' ) | .../l10n.php:195
19 | 0.0210 | 3295320 | _load_textdomain_just_in_time( $domain = 'lifterlms' ) | .../l10n.php:1409
20 | 0.0216 | 3398264 | _doing_it_wrong( $function_name = '_load_textdomain_just_in_time', $message = 'Translation loading for the <code>lifterlms</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' ) | .../l10n.php:1371
21 | 0.0216 | 3399608 | wp_trigger_error( $function_name = '', $message = 'Function _load_textdomain_just_in_time was called <strong>incorrectly</strong>. Translation loading for the <code>lifterlms</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.)', $error_level = ??? ) | .../functions.php:6061
22 | 0.0217 | 3400776 | trigger_error( $message = 'Function _load_textdomain_just_in_time was called <strong>incorrectly</strong>. Translation loading for the <code>lifterlms</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.)', $error_level = 1024 ) | .../functions.php:6121

( ! ) Notice: Function _load_textdomain_just_in_time was called <strong>incorrectly</strong>. Translation loading for the <code>lifterlms</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 /Users/brianhogg/Local Sites/llms-test/app/public/wp-includes/functions.php on line 6121
Call Stack
#	Time	Memory	Function	Location
1	0.0076	374640	{main}( )	.../plugins.php:0
2	0.0076	381552	require_once( '/Users/brianhogg/Local Sites/llms-test/app/public/wp-admin/admin.php )	.../plugins.php:10
3	0.0076	382384	require_once( '/Users/brianhogg/Local Sites/llms-test/app/public/wp-load.php )	.../admin.php:35
4	0.0076	382984	require_once( '/Users/brianhogg/Local Sites/llms-test/app/public/wp-config.php )	.../wp-load.php:50
5	0.0076	391960	require_once( '/Users/brianhogg/Local Sites/llms-test/app/public/wp-settings.php )	.../wp-config.php:107
6	0.0160	3096664	do_action( $hook_name = 'plugins_loaded' )	.../wp-settings.php:578
7	0.0160	3096880	WP_Hook->do_action( $args = [0 => ''] )	.../plugin.php:517
8	0.0160	3096880	WP_Hook->apply_filters( $value = '', $args = [0 => ''] )	.../class-wp-hook.php:348
9	0.0197	3199424	LifterLMS_Helper->init( '' )	.../class-wp-hook.php:324
10	0.0209	3290608	LifterLMS_Helper->crons( )	.../class-lifterlms-helper.php:101
11	0.0210	3292168	wp_schedule_event( $timestamp = 1755603343, $recurrence = 'daily', $hook = 'llms_helper_check_license_keys', $args = ???, $wp_error = ??? )	.../class-lifterlms-helper.php:121
12	0.0210	3292168	wp_get_schedules( )	.../cron.php:247
13	0.0210	3294048	apply_filters( $hook_name = 'cron_schedules', $value = [] )	.../cron.php:1136
14	0.0210	3294296	WP_Hook->apply_filters( $value = [], $args = [0 => []] )	.../plugin.php:205
15	0.0210	3294944	LLMS_Sessions->add_cron_schedule( $schedules = [] )	.../class-wp-hook.php:324
16	0.0210	3295320	__( $text = 'Every %d Minutes', $domain = 'lifterlms' )	.../class-llms-sessions.php:74
17	0.0210	3295320	translate( $text = 'Every %d Minutes', $domain = 'lifterlms' )	.../l10n.php:307
18	0.0210	3295320	get_translations_for_domain( $domain = 'lifterlms' )	.../l10n.php:195
19	0.0210	3295320	_load_textdomain_just_in_time( $domain = 'lifterlms' )	.../l10n.php:1409
20	0.0216	3398264	_doing_it_wrong( $function_name = '_load_textdomain_just_in_time', $message = 'Translation loading for the <code>lifterlms</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' )	.../l10n.php:1371
21	0.0216	3399608	wp_trigger_error( $function_name = '', $message = 'Function _load_textdomain_just_in_time was called <strong>incorrectly</strong>. Translation loading for the <code>lifterlms</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.)', $error_level = ??? )	.../functions.php:6061
22	0.0217	3400776	[trigger_error](http://www.php.net/function.trigger-error)( $message = 'Function _load_textdomain_just_in_time was called <strong>incorrectly</strong>. Translation loading for the <code>lifterlms</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.)', $error_level = 1024 )	.../functions.php:6121

System and Environment Information

System Report


Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions