• Hello,

    we are getting the error below for “site admins”:

    PHP Fatal error:  Uncaught Exception: Role provided does not exists - "" in ROOT/wp-content/plugins/wp-2fa/includes/classes/Admin/Controllers/class-settings.php:282
    Stack trace:
    #0 ROOT/wp-content/plugins/wp-2fa/includes/classes/Admin/Controllers/class-settings.php(301): WP2FA\Admin\Controllers\Settings::get_enabled_providers_for_role('')
    #1 ROOT/wp-content/plugins/wp-2fa/includes/classes/Authenticator/class-login.php(706): WP2FA\Admin\Controllers\Settings::is_provider_enabled_for_role('', 'email')
    #2 ROOT/wp-includes/class-wp-hook.php(307): WP2FA\Authenticator\Login::login_form_validate_2fa('')
    #3 ROOT/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)
    #4 ROOT/wp-includes/plugin.php(476): WP_Hook->do_action(Array)
    #5 ROOT/wp-settings.php(620): do_action('wp_loaded')
    #6 ROOT/wp-config.php(142): require_once('/var/www/html/i...')
    #7 ROOT/wp-load.php(50): require_once('/var/www/html/i in ROOT/wp-content/plugins/wp-2fa/includes/classes/Admin/Controllers/class-settings.php on line 282
    

    We have had 2FA enabled for super-admins only and it’s been working fine.
    We started testing the option “Only super admins and site admins”, and we are getting the same error in 2 situations (as we could check):

    1) Sub-site admins logging directly on the root domain (eg. domain.com/wp-admin)
    2) Sub-site admins logging on other sub-site where they are administrators (role), but not the “main administrator” (it’s not the user setup on Administration Email Address)
    3) [OK – WORKING] Sub-site admins logging on a sub-site where they are administrators (role), and also “main administrator” (it’s the user setup on Administration Email Address)

    NOTE: we updated to the latest version 2.3.0 released today, but no luck, we are getting the same error.

    WordPress version: 6.0.2
    PHP version: 7.4.30 (Supports 64bit values)

    Thank you,
    Rafael

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor robertabela

    (@robert681)

    Hello @rsoareslangara

    Thank you for using our plugin.

    I am sorry to read about your issue. We are looking into this; we are setting up a test scenario and we’ll get back to you with an update within a few hours.

    In the meantime, should you have any other questions, do not hesitate to ask.

    Plugin Contributor robertabela

    (@robert681)

    Hello @rsoareslangara

    We have reproduced the issue and prepared a patch for you. Can you please download the patch to address the issue?

    This patch will also be included in the next update of the plugin.

    Please let us know if there is anything else we can assist you with.

    Thread Starter rsoareslangara

    (@rsoareslangara)

    Hello @robert681,

    great, thank you so much for your promptly response for this issue.
    I’ll be testing it this week and let you know how it goes.

    Thank you,
    Rafael

    Thread Starter rsoareslangara

    (@rsoareslangara)

    Hello @robert681, good day.

    I believe that the original reported issue has been resolved, we didn’t experience any new crash. Thank you again for addressing that.

    We’ve just realized perhaps a more complex situation, as follows: when the General Policy changes from “Only super admins” to “Only super admins and site admins”, the individual user configuration “2FA Status” does not change automatically. Somehow, changing the policy many times, or resetting an user individually, we could make the user ‘2FA Status’ being reset to reflect to Policy in place.

    We know that this is more complex and perhaps out of the scope of this ticket, question: when the general policy changes, it’d be possible whether the plugin automatically review the users 2FA status to make it accordingly to the new Policy in place? So, if the user should be asked for 2FA or not. It could be also a button on the Policies webpage.

    Thanks again!
    Rafael

    Plugin Contributor robertabela

    (@robert681)

    Thank you for the update Rafael.

    I am glad to read that the patch fixed the issue. By the way, please do not forget to rate our plugin and service. These ratings are really helpful.

    In regards to the 2FA user status – these are not updated in real time. The user status is only updated when the user in question logs in to WordPress. Once they do so, during the login process there is a check in place to check which policies apply to the user, and then the status is updated.

    In earlier versions of the plugin the user statuses were updated in realtime. However, this resulted in a big problem on websites with thousands of users, which is understandable.

    Having said that, it is not a bad idea to add a button that would allow you to trigger an update or the 2FA user statuses. I’ve taken note of this. Thank you very much for the tip.

    Please let us know if there is anything else we can assist you with.

    Hello! Do you have a plan for when this patch will be released in an update? We have the same error on multisite.

    Plugin Contributor robertabela

    (@robert681)

    Hello @kflogdev Thank you for your message. As per these forums’ guidelines, if you need support from us can you please open your own forum thread? Thanks a lot for the understanding.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Multisite error: Uncaught Exception: Role provided does not exists’ is closed to new replies.