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 for translations / i18n loaded too early #4322

Open
wintermoor opened this issue Nov 13, 2024 · 0 comments
Open
Labels
bug This label could be used to identify issues that are caused by a defect in the product. regression Issue represents a change in behavior from a previous version that is not intended or desired..

Comments

@wintermoor
Copy link

Description

There is a new change in WordPress 6.7 that prevents plugins from loading translations too early, without waiting for more parts of WordPress being loaded. It also changes how load_plugin_textdomain() works, as it delays actual loading until the first __() call is encountered.

Refreshing my site with Neve theme brings up this notice like an error message.

I'd like to see no warnings and that strings are actually translated.

Solution:

This happened to WooCommerce plugin, too. They fixed it with these pull requests:
woocommerce/woocommerce#52055
Unfortunaly, I'm unable to contribute because of lacking coding knowledge. Maybe anybody else can take a look at this issue?

Step-by-step reproduction instructions

  1. Use WordPress 6.7
  2. Set site language to something other than en_US
  3. Ensure all translations are installed
  4. Refresh site

Screenshots, screen recording, code snippet or Help Scout ticket

Notice: Die Funktion _load_textdomain_just_in_time wurde fehlerhaft aufgerufen. Das Laden der Übersetzung für die Domain neve wurde zu früh ausgelöst. Das ist normalerweise ein Hinweis auf Code im Plugin oder Theme, der zu früh läuft. Übersetzungen sollten mit der Aktion init oder später geladen werden. Weitere Informationen: Debugging in WordPress (engl.). (Diese Meldung wurde in Version 6.7.0 hinzugefügt.) in /var/www/vhosts/event.XXXXXX.de/httpdocs/wp-includes/functions.php on line 6114

Environment info

https://pastebin.com/4buASWDz

Is the issue you are reporting a regression

Yes, this is a regression.

@wintermoor wintermoor added the bug This label could be used to identify issues that are caused by a defect in the product. label Nov 13, 2024
@pirate-bot pirate-bot added the regression Issue represents a change in behavior from a previous version that is not intended or desired.. label Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This label could be used to identify issues that are caused by a defect in the product. regression Issue represents a change in behavior from a previous version that is not intended or desired..
Projects
None yet
Development

No branches or pull requests

2 participants