bbPress deactivation caused Error: "You do not have sufficient permissions to access this page"

StackOverflow https://stackoverflow.com/questions/17279179

문제

All of a sudden this morning every admin user sees the above error when trying to access the dashboard.

This is a very common problem, but before you label it a duplicate, listen to the details. This instance of the problem is NOT caused by ANY of the normal factors:

  • Table prefixes were not changed.
  • We are not on a multi-site installation.
  • No database changes were made since last week

Our problem started after we deactivated the bbPress plugin. We are currently on WP v.3.5.2 and we deactivated bbPress v. 2.3.1

The big question is how/why this would happen, but a useful step to figuring that out would be getting the plugin re-activated (without access to the admin area).

UPDATE Thanks to Adam's help, we are able to reactivate the plugin by manually editing the option in the database. Now, the big questions is why deactivating bbPress is causing that error. We've tried deactivating all plugins by renaming /plugins to /xplugins (effectively deleting/deactivating them all), but the error still occurs until we re-activate bbPress.

도움이 되었습니까?

해결책

It will be a little tricky getting the bbPress plugin working again, but it is possible. You will need to understand how PHP arrays are stored in a database, and manipulate an existing array to add the bbPress plugin.

In the table wp_options, look for record where option_name='active_plugins' and backup the value for that record (I just store the text in notepad).

Next, make your change. In this extremely simple example, you would want to change "a:3" to "a:4", and before the last curly brace add i:3; ... then determine the length of the string for the bbPress plugin main php file (sorry I'm not very familiar with bbPress) and add the last line similar to the others.

a:3:{
   i:0;
   s:29:"gravityforms/gravityforms.php";
   i:1;
   s:21:"pagemash/pagemash.php";
   i:2;
   s:52:"testimonials-by-woothemes/woothemes-testimonials.php";
}

When you save the value to the database, make sure there is no whitespace. This SHOULD get yoru bbPress plugin back up and running.

As for the root of your problem, my guess is that there is a dashboard widget or another plugin that is tied to permissions that bbPress set up, and when bbPress was removed it removed what was being looked for.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top