Plugin Author
jarekk
(@jarekk)
Hi David,
Thank you for reporting this. Our developer will work on fixing this issue.
Best
The issue is ultimately caused because the plugin initialization code tries to load translated strings:
/www/1_768/public/wp-blog-header.php 13 calling require_once("\/www\/1_768\/public\/wp-load.php")
/www/1_768/public/wp-load.php 50 calling require_once("\/www\/1_768\/public\/wp-config.php")
/www/1_768/public/wp-config.php 136 calling require_once("\/www\/1_768\/public\/wp-settings.php")
/www/1_768/public/wp-settings.php 526 calling include_once("\/www\/1_768\/public\/wp-content\/plugins\/members\/members.php")
/www/1_768/public/wp-content/plugins/members/members.php 487 calling members_plugin()
/www/1_768/public/wp-content/plugins/members/members.php 483 calling get_instance()
/www/1_768/public/wp-content/plugins/members/members.php 95 calling includes()
/www/1_768/public/wp-content/plugins/members/members.php 209 calling require_once("\/www\/1_768\/public\/wp-content\/plugins\/members\/inc\/functions-users.php")
/www/1_768/public/wp-content/plugins/members/inc/functions-users.php 14 calling members_explicitly_deny_caps()
/www/1_768/public/wp-content/plugins/members/inc/functions-options.php 35 calling members_get_setting("explicit_denied_caps")
/www/1_768/public/wp-content/plugins/members/inc/functions-options.php 107 calling members_get_default_settings()
/www/1_768/public/wp-content/plugins/members/inc/functions-options.php 132 calling esc_html__("Sorry, but you do not have permission to view this content.", "members")
/www/1_768/public/wp-includes/l10n.php 339 calling translate("Sorry, but you do not have permission to view this content.", "members")
/www/1_768/public/wp-includes/l10n.php 194 calling get_translations_for_domain("members")
/www/1_768/public/wp-includes/l10n.php 1408 calling _load_textdomain_just_in_time("members")
/www/1_768/public/wp-includes/l10n.php 1370 calling _doing_it_wrong("_load_textdomain_just_in_time", "Function _load_textdomain_just_in_time was called <strong>incorrectly<\/strong>. Translation loading for the <code>members<\/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.ww.wp.xz.cn\/advanced-administration\/debug\/debug-wordpress\/\">Debugging in WordPress<\/a> for more information. (This message was added in version 6.7.0.)", "(This message was added in version 6.7.0.)")
in <b>/www/1_768/public/wp-includes/functions.php</b> on line <b>6160</b><br />
Hello,
we have the same problem too
any news?
I have the same issue which generate 500 error.
The issue stands in inc/functions-options.php with members_get_default_settings() function. This function tries to translate strings (lines 132 and 133) whereas textdomain are not yet loaded.
Several objects are initialized as soon as Members is initializing and part of them make a call this function through members_get_setting() function (class-manage-users.php, class-manage-roles.php, class-role-new.php….).
“load_textdomain” action is made after plugin loading. Therefore you should initialize theses objects with a wordpress hook like “init” or “admin_init”.
You should also have a look at functions-users.php lines 14 to 16: members_explicitly_deny_caps() function uses also members_get_setting().
Otherwise, one quick solution would be to avoid translatting the 2 sentences in lines 132 and 133 of functions-options.php. It is what I have done in my website.
Hi all,
We’ve just released a new update that should contain fix for the issue.
Regards,
Hello,
The issue is not solved with the new release:
- in members.php -> function includes() is called at the plugin initialization (ie. before textdomain are loaded).
- This function requires “inc/functions-users.php” in which (line 14) the function “members_explicitly_deny_caps()” is called.
- members_explicitly_deny_caps() is defined in “inc/functions-options.php” and uses “member_get_setting()” which call “members_get_default_settings()” whereas this function needs localization (error message are translated).
You should hook the “add_filter” at line 14 of “functions-user.php” with a hook later than “load_textdomain” hook.