Skip to:
Content
Pages
Categories
Search
Top
Bottom

Lost admin access after 2.o update

  • @texrat

    Participant

    I just upgraded to BP 2.0 and immediately lost ALL admin rights to my entire site after the upgrade completed. ???

    🙁

Viewing 25 replies - 26 through 50 (of 63 total)
  • @boonebgorges

    Keymaster

    @texrat – Thanks. It’s possible that other plugins would cause this sort of problem. You probably are running now, or have run in the past, the kind of plugin that would cause the behavior.

    I’ve opened a bug ticket to discuss the bug and possible fixes: https://buddypress.trac.wordpress.org/ticket/5553#ticket

    For anyone currently affected:
    – By default, BP does not create users with a status greater than Subscriber. This issue only affects people with a role higher than Subscriber
    – If your admin user account does not have access to the Dashboard, I’ve written a small plugin that you can use to repair. Instructions and code are here: https://gist.github.com/boonebgorges/4ee64723ba75caa3c7e1
    – If you need to repair other users, I recommend that you use the bulk update tools at Dashboard > Users

    Note that this is something that only happens during the 2.0 upgrade, so you don’t have to be afraid that it’ll happen again.

    Many apologies for the inconvenience, and thanks for your patience and help as we sort things out.

    @texrat

    Participant

    I added the plugin and reloaded the site per your instructions. Still get “You do not have sufficient permissions to access this page.” 🙁

    @boonebgorges

    Keymaster

    @texrat – Sorry you’re still having trouble. Do you have access to your database? If so, you should check in wp_usermeta to see what your user ID’s value for wp_capabilities is (if any). I’d also ask you to double- and triple-check that you’ve followed all the instructions in the plugin – it doesn’t give any visible feedback, and if you make a wrong step (such as putting it in plugins rather than mu-plugins, or using the wrong user_login value), it won’t let you know.

    @texrat

    Participant

    Ok, some more details…

    I was able to get in by way of another (generic) admin account I had set up. I can now see my texrat account had WP role set to “no role for this site” on the profile edit page. However, looking at the User list, it says “Spectator” for WP role and forum role (I should be Keymaster for the latter), which is the default *forum* role for bbPress. So maybe bbPress is the interfering plugin in my case?

    Anyway, I’m fixed now.

    Also, all of our bbPress members who did not have any forum role assigned yet now show as Pending.

    @texrat

    Participant

    Forgot to add: I did double check everything re the mu-plugins and user-role instructions. I had everything correct.

    @texrat

    Participant

    Sorry to post again. The problem seems to be a conflict between the new “Manage Signups” function and another plugin. I thought maybe bbPress, but it could also be “Confirm User Registration” by Ralph Hortt: http://www.horttcore.de/

    Right now I cannot get any of 167 users out of Manage Signups. If I Activate someone, they remain there afterward.

    I deactivated “Confirm User Registration” and now plugins are all out of whack. I can’t even view the Plugins page. I need to disable all of them and start over…

    @texrat

    Participant

    Plugin sanity restored, but I still have 152 pre-existing users seemingly in Pending status, although activating any or all of them results in a message that they are already activated. Which is interesting, because these users were all part of a bulk import when we changed domains last October… any idea how to clear that Pending bit?

    @imath

    Moderator

    Hi @textrat

    I’m really sorry to read about this issue. I’ve run some tests to try to reproduce. This is the results of it:

    1/ “Confirm User Registration” doesn’t seem to interfere. The plugin is adding a user_meta “authentication” set to 1 for each users. When a user logs in it checks if this user meta is there and if so allow the log in, else display a message saying the account is not authenticated.
    2/ The only way i’ve managed to have a user_status set to 0 and the activation_key still in usermeta for this user was to set the user_status to 0 myself directly in the database (testing config WP 3.8.3, BP 1.9.2 > 2.0 and Confirm User Registration)
    3/ From the Manage Signups screen if i activate this kind of user (user_status 0 and activation_key not empty), i have the message that user is already activated, but the user is no more in the list of pending accounts and is now available in the users list with the default role
    4/ About the 152 pre-existing, the only way i’ve managed to reproduce a similar problem was to restart all again and to delete the value of activation_key meta in the database. eg : activation_key > “” : The meta is there but empty. In this case, the user keeps on being in pending after trying to activate it.

    I think clearing the “pending bit” can be achieve by updating the “active” field to 1 into the signups table for the 152 pre-existing users. But, before doing so, you should check the ‘activation_key’ meta values for some of the 152 users to see if the value is empty. This way it could confirm my point 4.
    Then you should check for the corresponding user_status to be sure it is not set to 2.

    Whatever you do, i advise you to backup your database before.

    @notpoppy

    Participant

    I’m also having the same problem. Upgraded to Buddypress 2.0, now any time I try to access an admin page I get:

    You do not have sufficient permissions to access this page.

    I’ve disabled all plugins via the database but am still having the problem. How do I fix it?

    @imath

    Moderator

    @imath

    Moderator

    @notpoppy

    Do you have any plugins that deal with registration on your config ?

    @notpoppy

    Participant

    I see from the database two values for my administrator account have been changed as follows. They were originally:

    wp_user_level: 10
    wp_capabilities: a:2:{s:13:”administrator”;b:1;s:13:”bbp_keymaster”;b:1;}

    And are now:

    wp_user_level: 0
    wp_capabilities: a:1:{s:15:”bbp_participant”;b:1;}

    I changed both these back to their original values but I’m still getting the “You do not have sufficient permissions to access this page” error when I try to access an admin page.

    @notpoppy

    Participant

    @imath Yes, User Role Editor.

    @notpoppy

    Participant

    @imath Ah the script from @boonebgorges seems to have worked, thanks!

    @imath

    Moderator

    @notpoppy Great! Sorry again for the inconvenience. I’m not sure User Role Editor deals with registration as it seems to be a role management plugin. But i’ll check it.

    @livsy

    Participant

    Hi! I have the same problem with admin rights. @boonebgorges ‘s fix helped me a lot. But I have another problem. This fix can’t help users which get a subscriber’s role after registration. I set an author role for all new members of my site in wordpress settings. But it had no effect.

    @imath

    Moderator

    hi @livsy

    How were you doing before ? Once a user registered, you were changing the role before he activated his account ?

    Or are you choosing a role different than Subscriber in the WordPress setting (wp-admin/options-general) > New User Default Role dropdown field ?

    About the upgrade difficulties, were you using a plugin that was dealing with registrations, and if yes which one ?

    Thanks for your feedback.

    @imath

    Moderator

    @livsy

    Just tested in WP 3.9/ BuddyPress 2.0, the role set for a new user is the one that is defined in the WordPress setting (wp-admin/options-general) > New User Default Role dropdown field.

    @livsy

    Participant

    Hi! I am using BP Disable Activation Reloaded plugin. I deleted it (and all other plugins, except BP). But problem with user role still exists.
    I set author role for new members in wordpress settings. It was a long time ago, before update to 2.0

    @imath

    Moderator

    @livsy if you try to register a new account, this account should have the role you defined in WordPress settings.

    I’m very curious about what happened during upgrade. If it were possible i’d really like to view the users, usermeta and signups tables!

    Can you see the users with no role in your users list ?
    If so, you can batch create roles for these users using the “change role to” select box on top of the users list.

    i’m going to test BP Disable Activation Reloaded to see if the problem was linked to this plugin.

    @livsy

    Participant

    How can I show this tables? I registered a new user by myself a minute ago. And I saw in his profile – he has no role for my site. Of course I can set it manualy but it is not convenient.

    @imath

    Moderator

    @livsy

    I registered a new user by myself a minute ago. And I saw in his profile – he has no role for my site

    This shouldn’t happen.

    What is your config ? The upgrade problem concerns a non multisite WordPress. Is it your config ?

    “Viewing the sql tables” means that you’ll need to export it using PhpMyAdmin for instance and send it to me.

    By the way, i’ve tested BP Disable Activation Reloaded and it’s not the cause of the problem. It’s “someone” else.

    @imath

    Moderator

    And you can “batch” edit roles :

    batch edit roles

    @livsy

    Participant

    I am using a non multisite WordPress.

    @imath

    Moderator

    @livsy

    ok downloaded it. Deleted the link in your reply. You can delete it from you google drive.

    Thanks a lot checking it.

Viewing 25 replies - 26 through 50 (of 63 total)
  • The topic ‘Lost admin access after 2.o update’ is closed to new replies.
Skip to toolbar