You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
With Wordpress 6.7, this PHP error appears in PHP logs:
[13-Nov-2024 10:48:29 UTC] PHP Notice: Function _load_textdomain_just_in_time was called <strong>incorrectly</strong>. Translation loading for the <code>qtranslate</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 \wp-includes\functions.php on line 6114
[13-Nov-2024 10:48:29 UTC] PHP Stack trace:
[13-Nov-2024 10:48:29 UTC] PHP 1. {main}() \wp-admin\admin.php:0
[13-Nov-2024 10:48:29 UTC] PHP 2. require_once() \wp-admin\admin.php:34
[13-Nov-2024 10:48:29 UTC] PHP 3. require_once() \wp-load.php:50
[13-Nov-2024 10:48:29 UTC] PHP 4. require_once() \wp-config.php:102
[13-Nov-2024 10:48:29 UTC] PHP 5. do_action($hook_name = 'plugins_loaded') \wp-settings.php:559
[13-Nov-2024 10:48:29 UTC] PHP 6. WP_Hook->do_action($args = [0 => '']) \wp-includes\plugin.php:517
[13-Nov-2024 10:48:29 UTC] PHP 7. WP_Hook->apply_filters($value = '', $args = [0 => '']) \wp-includes\class-wp-hook.php:348
[13-Nov-2024 10:48:29 UTC] PHP 8. qtranxf_init_language('') \wp-includes\class-wp-hook.php:324
[13-Nov-2024 10:48:29 UTC] PHP 9. qtranxf_admin_load() \wp-content\plugins\qtranslate-xt\src\init.php:129
[13-Nov-2024 10:48:29 UTC] PHP 10. qtranxf_admin_load_config() \wp-content\plugins\qtranslate-xt\src\admin\admin.php:834
[13-Nov-2024 10:48:29 UTC] PHP 11. qtranxf_admin_set_default_options($options = ['front' => ['int' => [...], 'bool' => [...], 'str' => [...], 'text' => [...], 'array' => [...]], 'default_value' => ['default_language' => NULL, 'enabled_languages' => NULL, 'qtrans_compatibility' => FALSE, 'disable_client_cookies' => FALSE, 'flag_location' => NULL, 'filter_options' => 'blogname blogdescription widget_%', 'ignore_file_types' => 'gif,jpg,jpeg,png,svg,pdf,swf,tif,rar,zip,7z,mpg,divx,mpeg,avi,css,js,mp3,mp4,apk', 'domains' => NULL], 'languages' => ['language_name' => 'qtranslate_language_names', 'locale' => 'qtranslate_locales', 'locale_html' => 'qtranslate_locales_html', 'not_available' => 'qtranslate_na_messages', 'date_format' => 'qtranslate_date_formats', 'time_format' => 'qtranslate_time_formats', 'flag' => 'qtranslate_flags'], 'admin' => ['int' => [...], 'bool' => [...], 'str' => [...], 'text' => [...], 'array' => [...], 'admin_enabled_modules' => [...]]]) \wp-content\plugins\qtranslate-xt\src\admin\admin_options.php:54
[13-Nov-2024 10:48:29 UTC] PHP 12. QTX_Admin_Module::get_modules() \wp-content\plugins\qtranslate-xt\src\admin\admin_options.php:44
[13-Nov-2024 10:48:29 UTC] PHP 13. QTX_Admin_Module::get_builtin_setup() \wp-content\plugins\qtranslate-xt\src\modules\admin_module.php:148
[13-Nov-2024 10:48:29 UTC] PHP 14. __($text = 'Slugs translation', $domain = 'qtranslate') \wp-content\plugins\qtranslate-xt\src\modules\admin_module.php:130
[13-Nov-2024 10:48:29 UTC] PHP 15. translate($text = 'Slugs translation', $domain = 'qtranslate') \wp-includes\l10n.php:306
[13-Nov-2024 10:48:29 UTC] PHP 16. get_translations_for_domain($domain = 'qtranslate') \wp-includes\l10n.php:194
[13-Nov-2024 10:48:29 UTC] PHP 17. _load_textdomain_just_in_time($domain = 'qtranslate') \wp-includes\l10n.php:1385
[13-Nov-2024 10:48:29 UTC] PHP 18. _doing_it_wrong($function_name = '_load_textdomain_just_in_time', $message = 'Translation loading for the <code>qtranslate</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') \wp-includes\l10n.php:1347
[13-Nov-2024 10:48:29 UTC] PHP 19. wp_trigger_error($function_name = '', $message = 'Function _load_textdomain_just_in_time was called <strong>incorrectly</strong>. Translation loading for the <code>qtranslate</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 = *uninitialized*) \wp-includes\functions.php:6054
[13-Nov-2024 10:48:29 UTC] PHP 20. trigger_error($message = 'Function _load_textdomain_just_in_time was called <strong>incorrectly</strong>. Translation loading for the <code>qtranslate</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) \wp-includes\functions.php:6114
yoancutillas
changed the title
[Slug module?] [Admin module?] Not working properly with Wordpress 6.7 in the admin
[Admin module?] PHP Error with Wordpress 6.7 in the admin: Translation loading for the qtranslate domain was triggered too early
Nov 14, 2024
// TODO delay to `init` action?
// See https://developer.wordpress.org/reference/functions/load_plugin_textdomain/
// Loading the plugin translations should not be done during plugins_loaded action since that is too early and prevent
// other language related plugins from correctly hooking up with load_textdomain() function and doing whatever they want to do.
// Calling load_plugin_textdomain() should be delayed until init action.
qtranxf_load_plugin_textdomain();
Describe the bug
With Wordpress 6.7, this PHP error appears in PHP logs:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
No PHP error should appear.
Screenshots
Debug info
Edit: This issue is not related to the string that were not translated, and to the Slug module, so I have updated the bug description.
The text was updated successfully, but these errors were encountered: