Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_load_textdomain_just_in_time error with WordPress 6.7 #1208

Open
srtfisher opened this issue Dec 2, 2024 · 0 comments · May be fixed by #1209
Open

_load_textdomain_just_in_time error with WordPress 6.7 #1208

srtfisher opened this issue Dec 2, 2024 · 0 comments · May be fixed by #1209
Assignees
Labels
bug Something isn't working

Comments

@srtfisher
Copy link
Member

Description of the bug

We are seeing a _doing_it_wrong() call with WordPress 6.7:

Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the apple-news 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.)

Steps To Reproduce

  1. Load Apple News with WordPress 6.7.
  2. Run a unit test and notice a _doing_it_wrong().

Additional Information

Backtrace:

 22▕   0 => array:3 [
 23▕     "file" => "/Users/srtfisher/broadway/www/project/wp-includes/l10n.php"
 24▕     "line" => 1409
 25▕     "function" => "_load_textdomain_just_in_time"
 26▕   ]
 27▕   1 => array:3 [
 28▕     "file" => "/Users/srtfisher/broadway/www/project/wp-includes/l10n.php"
 29▕     "line" => 194
 30▕     "function" => "get_translations_for_domain"
 31▕   ]
 32▕   2 => array:3 [
 33▕     "file" => "/Users/srtfisher/broadway/www/project/wp-includes/l10n.php"
 34▕     "line" => 306
 35▕     "function" => "translate"
 36▕   ]
 37▕   3 => array:3 [
 38▕     "file" => "/Users/srtfisher/broadway/www/project/wp-content/plugins/apple-news/includes/apple-exporter/class-theme.php"
 39▕     "line" => 559
 40▕     "function" => "__"
 41▕   ]
 42▕   4 => array:5 [
 43▕     "file" => "/Users/srtfisher/broadway/www/project/wp-content/plugins/apple-news/includes/apple-exporter/class-theme.php"
 44▕     "line" => 432
 45▕     "function" => "initialize_options"
 46▕     "class" => "Apple_Exporter\Theme"
 47▕     "type" => "::"
 48▕   ]
 49▕   5 => array:5 [
 50▕     "file" => "/Users/srtfisher/broadway/www/project/wp-content/plugins/apple-news/includes/class-apple-news.php"
 51▕     "line" => 309
 52▕     "function" => "get_options"
 53▕     "class" => "Apple_Exporter\Theme"
 54▕     "type" => "::"
 55▕   ]
 56▕   6 => array:5 [
 57▕     "file" => "/Users/srtfisher/broadway/www/project/wp-content/plugins/apple-news/includes/class-apple-news.php"
 58▕     "line" => 288
 59▕     "function" => "create_default_theme"
 60▕     "class" => "Apple_News"
 61▕     "type" => "->"
 62▕   ]
 63▕   7 => array:5 [
 64▕     "file" => "/Users/srtfisher/broadway/www/project/wp-includes/class-wp-hook.php"
 65▕     "line" => 324
 66▕     "function" => "action_plugins_loaded"
 67▕     "class" => "Apple_News"
 68▕     "type" => "->"
 69▕   ]
 70▕   8 => array:5 [
 71▕     "file" => "/Users/srtfisher/broadway/www/project/wp-includes/class-wp-hook.php"
 72▕     "line" => 348
 73▕     "function" => "apply_filters"
 74▕     "class" => "WP_Hook"
 75▕     "type" => "->"
 76▕   ]
 77▕   9 => array:5 [
 78▕     "file" => "/Users/srtfisher/broadway/www/project/wp-includes/plugin.php"
 79▕     "line" => 517
 80▕     "function" => "do_action"
 81▕     "class" => "WP_Hook"
 82▕     "type" => "->"
 83▕   ]
 84▕   10 => array:3 [
 85▕     "file" => "/Users/srtfisher/broadway/www/project/wp-settings.php"
 86▕     "line" => 559
 87▕     "function" => "do_action"
 88▕   ]
 89▕   11 => array:4 [
 90▕     "file" => "/Users/srtfisher/broadway/www/project/wp-content/mu-plugins/vendor/alleyinteractive/mantle-framework/src/mantle/testing/wordpress-bootstrap.php"
 91▕     "line" => 214
 92▕     "args" => array:1 [
 93▕       0 => "/Users/srtfisher/broadway/www/project/wp-settings.php"
 94▕     ]
 95▕     "function" => "require_once"
 96▕   ]
 97▕   12 => array:4 [
 98▕     "file" => "/Users/srtfisher/broadway/www/project/wp-content/mu-plugins/vendor/alleyinteractive/mantle-framework/src/mantle/testing/install-wordpress.php"
 99▕     "line" => 21
100▕     "args" => array:1 [
101▕       0 => "/Users/srtfisher/broadway/www/project/wp-content/mu-plugins/vendor/alleyinteractive/mantle-framework/src/mantle/testing/wordpress-bootstrap.php"
102▕     ]
103▕     "function" => "require_once"
104▕   ]
105▕ ]
@srtfisher srtfisher added the bug Something isn't working label Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants