• Resolved yardtroubles

    (@yardtroubles)


    I have the Two Factor plugin installed and active. However, it doesn’t show up in my menu so I can configure it. Any idea why that might be?

Viewing 15 replies - 1 through 15 (of 18 total)
  • Plugin Author David Anderson

    (@davidanderson)

    Hi,

    Where are you looking for it? It’s a top-level menu item (with the overall plugin settings being in a separate entry, under “Settings”). Are you on single site or multisite?

    David

    Thread Starter yardtroubles

    (@yardtroubles)

    David,

    Thanks for the reply. Mine is a single site. Yup, I’m looking for the Two Factor menu item in the main (top level) menu. It’s simply not there.

    I even tried switching to Troubleshooting mode and disabling all of my plugins, but its not there. It’s strange, because the functionality works OK when users login. But I’m also having an issue where the QR code isn’t generated on my site’s page where users maintain their accounts and configure 2FA for the first time.

    Plugin Author David Anderson

    (@davidanderson)

    Does it work if for testing purposes you not only temporarily deactivate all your other plugins, but also switch to a default theme, and reload the dashboard?

    Thread Starter yardtroubles

    (@yardtroubles)

    No, it’s still not there.

    Plugin Author David Anderson

    (@davidanderson)

    This is a problem I’ve never come across before (in 10 years). If you’ve deactivated everything else, then in theory your site ought to then be in the condition of a new, pristine WordPress site. So, I’m strugging for ideas…

    One possibility is that your logged-in user lacks a capability in WP’s internal capability lists. What happens if you create a new admin user and login as that – is it visible then?

    Thread Starter yardtroubles

    (@yardtroubles)

    Just tried setting up a separate admin, still no luck.

    It’s weird. I can’t edit the settings, but Two Factor works properly, including generating the QR code to register with my authenticator, E-mailing codes, and validating logins using the corresponding codes. But I have 2 issues:

    1. The aforementioned lack of the ability to configure any of the Two Factor settings since the menu item is missing, and
    2. The inability to have the QR code display for new users when the short code is embedded in a particular account management page.

    Any other ideas as to how to debug? Is there a default URL that usually brings up the settings page?

    Plugin Author David Anderson

    (@davidanderson)

    The page is at /wp-admin/options-general.php?page=two-factor-auth on your website – what happens if you visit that?

    Thread Starter yardtroubles

    (@yardtroubles)

    I get an error that says “Sorry, you are not authorized to access this page.”

    That’s really strange, too. If there was a permissions issue at the file level, the plugin shouldn’t work. So, it must be a permission issue in WordPress. But I’m an admin. I’ll have to try to dig into this further. If you have any suggestions for where to look, I’m open to them (and they are VERY much appreciated!).

    Plugin Author David Anderson

    (@davidanderson)

    To get the complete picture, can you also try wp-admin/options-general.php?page=two-factor-auth on your site – what does that do?

    Thread Starter yardtroubles

    (@yardtroubles)

    I still get “Sorry, you are not allowed to access this page.” I’m trying to debug. So far, the file and folder permissions on the backend seem to be configured properly. And I made sure the Admin role has all possible permissions on the front end. So now I’m really confused.

    Plugin Author David Anderson

    (@davidanderson)

    Have you ever used any plugins like “User Role Editor” that can edit permissions and capabilities, or any other plugins that might adjust these?

    Thread Starter yardtroubles

    (@yardtroubles)

    I have. That’s what I used to confirm that things are set up correctly on the front end.

    Plugin Author David Anderson

    (@davidanderson)

    In User Role Editor, you should check whether both your user and the admin role have the “read” permission.

    Thread Starter yardtroubles

    (@yardtroubles)

    They do. I can’t post a picture or I’d show the screen capture. My Admin role has all 437 rights, and the standard user has the “Read” permission and “Level 0”.

    Plugin Author David Anderson

    (@davidanderson)

    Here – https://plugins.trac.www.ads-software.com/browser/two-factor-authentication/tags/1.14.17/two-factor-login.php#L149 – you can see the function which adds the menu entry.

    Currently the content of the function reads:

        global $current_user;
        if ($this->is_activated_for_user($current_user->ID)) {
    	add_menu_page(__('Two Factor Authentication', 'two-factor-authentication'), __('Two Factor Auth', 'two-factor-authentication'), 'read', 'two-factor-auth-user', array($this, 'show_dashboard_user_settings_page'), 
    $this->includes_url().'/tfa_admin_icon_16x16.png', 72);
    	                }

    If you change the if line to

    if (true) {

    … then does the menu entry then appear? This change will see whether it’s the condition in that if condition that’s stopping you, rather than the requirement for the read permission on the next line.Though, I don’t think it should be, since if you had the read permission, then you ought to be able to visit the page directly.

    Though, I notice that I gave the same URL for both pages above, and neither of us noticed, so we haven’t actually tested visiting the user page directly yet. That’s at:

    /wp-admin/admin.php?page=two-factor-auth-user
Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘No Menu Item’ is closed to new replies.