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

Jetpack Backup: WordPress 6.8 compatibility - _load_textdomain_just_in_time doing it wrong notice being logged #42395

Closed
Tracked by #39818
coder-karen opened this issue Mar 12, 2025 · 1 comment · Fixed by #42396
Assignees
Labels
[Package] Backup [Plugin] Backup A plugin that allows users to save every change and get back online quickly with one-click restores. [Pri] Normal [Status] Auto-allocated [Type] Bug When a feature is broken and / or not performing as intended

Comments

@coder-karen
Copy link
Contributor

coder-karen commented Mar 12, 2025

Issue

In testing with WordPress 6.8-beta2, I noticed a _load_textdomain_just_in_time 'doing it wrong' notice being logged for Jetpack Backup (and the notice doesn't appear to be visible in 6.7.0 or 6.7.1/6.7.2 despite the message, for US English (visible for other translations though) ):

PHP Notice:  Function _load_textdomain_just_in_time was called <strong>incorrectly</strong>. Translation loading for the <code>jetpack-backup</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 /var/www/html/wp-includes/functions.php on line 6121

The following stack trace is logged by adding extra debugging in the l10n.php file:

Stack trace:
#0 /var/www/html/wp-includes/l10n.php(1412): _load_textdomain_just_in_time()
#1 /var/www/html/wp-includes/l10n.php(195): get_translations_for_domain()
#2 /var/www/html/wp-includes/l10n.php(307): translate()
#3 /usr/local/src/jetpack-monorepo/projects/packages/assets/src/class-assets.php(664): __()
#4 /var/www/html/wp-includes/class-wp-hook.php(324): Automattic\Jetpack\Assets::filter_gettext()
#5 /var/www/html/wp-includes/plugin.php(205): WP_Hook->apply_filters()
#6 /var/www/html/wp-includes/l10n.php(220): apply_filters()
#7 /var/www/html/wp-includes/l10n.php(307): translate()
#8 /usr/local/src/jetpack-monorepo/projects/packages/backup/src/class-jetpack-backup.php(123): __()
#9 /usr/local/src/jetpack-monorepo/projects/plugins/backup/jetpack-backup.php(185): Automattic\Jetpack\Backup\V0005\Jetpack_Backup::initialize()
#10 /var/www/html/wp-settings.php(545): include_once('...')
#11 /var/www/html/wp-config.php(119): require_once('...')
#12 /var/www/html/wp-load.php(50): require_once('...')
#13 /var/www/html/wp-admin/admin.php(35): require_once('...')
#14 {main}

Steps to replicate

On a self-hosted test site, with Jetpack Backup installed and active:

  • Install the WordPress Beta Tester plugin
  • Go to Tools > Beta Testing, and set the plugin to use Beta/RC Only (in order to upgrade to WP 6.8-beta2)
  • Go to Dashboard > Updates, and update to WP 6.8-beta2.
  • Load any page, and check error logs. You should see PHP Notice: Function _load_textdomain_just_in_time was called <strong>incorrectly</strong>. Translation loading for the <code>jetpack-backup</code> domain was triggered too early.

Also replicable in WP 6.7.2 with a translation such as Deutsch, if WordPress is reinstalled using the new language.

Other relevant links

WordPress 6.8 compatibility parent issue: #39818

@github-actions github-actions bot added [Feature Group] Content Management Features related to the tools and screens that admins use to manage their sites core content. [Feature] Backups [Feature] Error Reporting labels Mar 12, 2025
Copy link
Contributor

OpenAI suggested the following labels for this issue:

  • [Feature Group] Content Management: The issue involves compatibility and potentially incorrect loading of translations related to the Jetpack Backup plugin, which is part of content management.
  • [Feature] Backup & Scan: The issue is specifically related to Jetpack Backup, so this label directly addresses the functionality impacted by the notice.
  • [Feature] Error Reporting: The logging of a PHP notice indicates there’s a need for error reporting to help developers address the issue.

@coder-karen coder-karen added [Type] Bug When a feature is broken and / or not performing as intended and removed [Feature] Backups [Feature Group] Content Management Features related to the tools and screens that admins use to manage their sites core content. [Experiment] AI labels added [Feature] Error Reporting labels Mar 12, 2025
@coder-karen coder-karen self-assigned this Mar 12, 2025
@coder-karen coder-karen added the [Plugin] Backup A plugin that allows users to save every change and get back online quickly with one-click restores. label Mar 12, 2025
@janmckell janmckell moved this from Needs Triage to Triaged in Automattic Prioritization: The One Board ™ Mar 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Backup [Plugin] Backup A plugin that allows users to save every change and get back online quickly with one-click restores. [Pri] Normal [Status] Auto-allocated [Type] Bug When a feature is broken and / or not performing as intended
3 participants