Hello @filiprimo
Thank you for using our plugin.
I am sorry to read about your issue. Can you please let us know what version of WordPress and PHP are you using?
Looking forward to hearing from you.
Hi @robert681
PHP version 7.4.26 (Supports 64bit values)
WP Version 5.8.2
If you need more info please let me know.
Thanks.
Hi!
Any update on this?
Has it been fixed on version 2.0.1?
Unfortunately no update, but i have the same issue.
PHP version 7.4.26
Plugin version 2.0.1
Wordpress 5.8.2
Beside this: Really great Plugin! Thanks a lot for your hard work!
Hello @falk07 and @filiprimo
We have a fix for you. Can you please download this version of the plugin and install it? This should fix the issue.
Please keep us posted and we look forward to hearing from you.
Hi @robert681
Thanks for that.
I saw you changed two files in this new version and I’d say the issue won’t happen anymore. Let’s see… I’ll let this new version run for a few days and keep an I on our RUM tool.
And unfortunately there’s another error:
An error of type E_ERROR was caused in line 351 of the file
.../wp-content/plugins/wp-2fa/includes/classes/WP2FA.php.
Error message: Uncaught TypeError: Argument 4 passed to
WP2FA\WP2FA::get_wp2fa_setting() must be of the type string, null
given, called in
.../wp-content/plugins/wp-2fa/includes/classes/Admin/Controllers/class-settings.php
on line 179 and defined in
.../wp-content/plugins/wp-2fa/includes/classes/WP2FA.php:351
Stack trace:
#0 .../wp-content/plugins/wp-2fa/includes/classes/Admin/Controllers/class-settings.php(179):
WP2FA\WP2FA::get_wp2fa_setting('grace-policy', false, false, NULL)
#1 .../wp-content/plugins/wp-2fa/includes/classes/Admin/User.php(762):
WP2FA\Admin\Controllers\Settings::get_role_or_default_setting('grace-policy',
Object(WP_User))
#2 .../wp-content/plugins/wp-2fa/includes/classes/Admin/User.php(89):
WP2FA\Admin\User->setUserPoliciesAndGrace()
#3 .../wp-content/plugins/wp-2fa/includes/classes/Admin/User.php(72):
WP2FA\Admin\User->update_meta_if_necessary()
#4 .../wp-content/plugins/wp-2fa/includes/classes/Admin/User.php(59):
WP2FA\Admin\User->__
BUT, I guess this error was thrown because I had a WordPress user who had literally no role,. The user was roleless. I already set a role for him.
Do you think the fact that I had a roleless user could have caused this new error?
Hello @filiprimo
Thank you for the update. I am glad to read the first issue is solved. We are aware of the second issue and are working on a fix. We should be releasing a maintenance update in the upcoming days.
Out of curiosity, in which situation would a user have no role? And is there an actual use / requirement for such situation? We’d like to learn more about this since this is not the first time we encountered it, and we’d like to see how to better support it.
Looking forward to hearing from you.
Hi @robert681
Just for you to know it seems the update you released on https://www.wpwhitesecurity.com/downloads/support/wp-2fa_null_vars_fix.zip has fixed the problem. Our RUM haven’t caught any errors in the last 5 days I guess.
About the scenario where a user is roleless I can’t be of much help. I have no idea why that user had no role.
The thing is that due to your plugin’s code I went to see if any user was roleless and I had one who had no role. Then I set their role to Subscriber and the error stopped. I actually can’t see situation where a user would have no role. Maybe the core shouldn’t even let this happen…
Thank you for your update @filiprimo
I am glad to hear that the patch solved the issue. We will be releasing the official update some time this week. In the meantime, if there is anything else we can assist you with, please do not hesitate to ask.
Also, please don’t forget to spare a minute to rate our plugin and service. These ratings really help us.
Have a great day.