PHP Notice Issue
-
Dear myCRED Development Team,
I am experiencing a PHP Notice error while using the myCRED plugin on my WordPress site. Below are the details of the error message:
PHP Notice: Function _load_textdomain_just_in_time was called <strong>incorrectly</strong>. Translation loading for the <code>mycred</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.www.ads-software.com/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 6114
PHP Stack Trace:
PHP Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the mycred 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.) in /var/www/html/wp-includes/functions.php on line 6114
PHP Stack trace:
PHP 1. {main}() /var/www/html/wp-admin/update-core.php:0
PHP 2. require_once() /var/www/html/wp-admin/update-core.php:10
PHP 3. require_once() /var/www/html/wp-admin/admin.php:34
PHP 4. require_once() /var/www/html/wp-load.php:50
PHP 5. require_once() /var/www/html/wp-config.php:129
PHP 6. include_once() /var/www/html/wp-settings.php:526
PHP 7. mycred_core() /var/www/html/wp-content/plugins/mycred/mycred.php:1244
PHP 8. myCRED_Core::instance() /var/www/html/wp-content/plugins/mycred/mycred.php:1242
PHP 9. myCRED_Core->construct() /var/www/html/wp-content/plugins/mycred/mycred.php:47 PHP 10. myCRED_Core->internal() /var/www/html/wp-content/plugins/mycred/mycred.php:126 PHP 11. mycred_get_types($name_first = TRUE) /var/www/html/wp-content/plugins/mycred/mycred.php:350 PHP 12. mycred_get_point_type_name($point_type = 'mycred_default', $singular = FALSE) /var/www/html/wp-content/plugins/mycred/includes/mycred-functions.php:2469 PHP 13. mycred($point_type = 'mycred_default') /var/www/html/wp-content/plugins/mycred/includes/mycred-functions.php:2614 PHP 14. myCRED_Settings->__construct($point_type = uninitialized) /var/www/html/wp-content/plugins/mycred/includes/mycred-functions.php:1784 PHP 15. myCRED_Settings->get_point_type_settings() /var/www/html/wp-content/plugins/mycred/includes/mycred-functions.php:99 PHP 16. myCRED_Settings->defaults() /var/www/html/wp-content/plugins/mycred/includes/mycred-functions.php:164 PHP 17. ($text = 'Point', $domain = 'mycred') /var/www/html/wp-content/plugins/mycred/includes/mycred-functions.php:132
PHP 18. translate($text = 'Point', $domain = 'mycred') /var/www/html/wp-includes/l10n.php:306
PHP 19. get_translations_for_domain($domain = 'mycred') /var/www/html/wp-includes/l10n.php:194
PHP 20. _load_textdomain_just_in_time($domain = 'mycred') /var/www/html/wp-includes/l10n.php:1408
PHP 21. _doing_it_wrong($function_name = '_load_textdomain_just_in_time', $message = 'Translation loading for the mycred 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.', $version = '6.7.0') /var/www/html/wp-includes/l10n.php:1378
PHP 22. wp_trigger_error($function_name = '', $message = 'Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the mycred 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.)', $error_level = uninitialized) /var/www/html/wp-includes/functions.php:6054
PHP 23. trigger_error($message = 'Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the mycred 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.)', $error_level = 1024) /var/www/html/wp-includes/functions.php:6114The issue seems to occur because translation loading for the
mycred
domain is being triggered too early, which is not in compliance with the guidelines mentioned in the WordPress documentation. The recommended approach is to load translations during theinit
action or later.I would greatly appreciate it if you could investigate this issue and provide guidance or a fix for this problem. Please let me know if you need further details or access to my environment for debugging.
Thank you for your attention to this matter.
- You must be logged in to reply to this topic.