• Resolved lachlanphillips

    (@lachlanphillips)


    Hi,

    This is an issue I’ve seen in other Multisite plugins.

    Basically I have 2fa enabled for super_admins. On a multisite subsite the super_admin is a member of the site, but has not got a role (role is “none” or “”)

    This means that I get the following error as 2fa is looking for a “role”, but super_admins don’t technically have a role.

    PHP Fatal error:  Uncaught Exception: Role provided does not exists - "" in /ROOT/wp-content/plugins/wp-2fa/includes/classes/Admin/Controllers/class-settings.php:288
    Stack trace:
    #0 /ROOT/wp-content/plugins/wp-2fa/includes/classes/Admin/Controllers/class-settings.php(307): WP2FA\Admin\Controllers\Settings::get_enabled_providers_for_role()
    #1 /ROOT/wp-content/plugins/wp-2fa/includes/classes/Authenticator/class-login.php(682): WP2FA\Admin\Controllers\Settings::is_provider_enabled_for_role()
    #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()
    #4 /ROOT/wp-includes/plugin.php(476): WP_Hook->do_action()
    #5 /ROOT/wp-login.php(518): do_action()
    #6 {main}
      thrown in /ROOT/wp-content/plugins/wp-2fa/includes/classes/Admin/Controllers/class-settings.php on line 288

    Any ideas or expected updates would be welcome. Thanks

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

    (@robert681)

    Hello @lachlanphillips

    Thank you for using our plugin.

    We are aware of this issue and we will be fixing it in the upcoming update of the plugin. As you said the problem occurs because “super admin” is not a role technically.

    However, there is a temporary workaround for this: you can assign the super admins admin role on some of the sub sites. This won’t affect your functionality since they are admins anyway, and you can work around this problem for now.

    I hope the above helps. Please let me know if you need any further information or assistance.

    Hello,

    we are getting the same error, but what has raised it is different.
    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)

    Hopefully this might be the same root-cause of the firstly reported issue and we have everything fixed soon.

    Thank you,

    Plugin Contributor robertabela

    (@robert681)

    Hello @rsoareslangara

    Thank you for your post and for using our plugin.

    If you need support, as per these forums’ guidelines please open your own forum thread, or send us an email at [email protected].

    Thank you for your understanding and cooperation.

    Plugin Contributor robertabela

    (@robert681)

    Hello @lachlanphillips

    We have just released update 2.3.0 in which we fixed this issue. Please refer to the WP 2FA v2.3.0 release notes for more information on what is new and improved in this update.

    Please install the latest update and let us know if you need any further assistance.

    Have a great day and thank you for using our plugin.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Role provided does not exists’ is closed to new replies.