Lost admin access after 2.o update
@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.
I added the plugin and reloaded the site per your instructions. Still get “You do not have sufficient permissions to access this page.”
@texrat – Sorry you’re still having trouble. Do you have access to your database? If so, you should check in
wp_usermetato see what your user ID’s value for
wp_capabilitiesis (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
mu-plugins, or using the wrong
user_loginvalue), it won’t let you know.
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.
Forgot to add: I did double check everything re the mu-plugins and user-role instructions. I had everything correct.
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…
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?
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.
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?
In this reply http://buddypress.org/support/topic/lost-admin-access-after-2-o-update/page/2/#post-181524, @boonebgorges explained how to fix it :
i’m re-pasting the url to the gist here: https://gist.github.com/boonebgorges/4ee64723ba75caa3c7e1
Do you have any plugins that deal with registration on your config ?
I see from the database two values for my administrator account have been changed as follows. They were originally:
And are now:
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 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.
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.
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.
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.
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
@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.
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.
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.
The topic ‘Lost admin access after 2.o update’ is closed to new replies.