0

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.

emersonthis
  • 32,822
  • 59
  • 210
  • 375

1 Answers1

2

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.

Adam Erstelle
  • 2,454
  • 3
  • 21
  • 35
  • Thanks. I got it to activate by adding `i:25;s:19:"bbpress/bbpress.php";` to the end of the array, but I'm a little nervous about hacking the option on my live database because I'm not 100% of how it works. Can you tell me: 1. Does the order of the items in that array matter? 2. What is the `i:` key and how do I determine it's value? – emersonthis Jun 24 '13 at 15:53
  • Still not able to figure out why the plugin deactivation is causing the error. Tried removing ALL plugins (see my update above) and the error still happens. – emersonthis Jun 24 '13 at 16:07
  • the i:25 means it is the 25th index in the array (indexes are 0 based, so the 25th index is the 26th item). – Adam Erstelle Jun 24 '13 at 16:19
  • For your first question in the comments, the order kinda does matter. It has to be i:X;s:X:""; – Adam Erstelle Jun 24 '13 at 16:20
  • Thanks. I meant the order of the i/s pair with respect to others. For example, can the new `i:25;s:19:"bbpress/bbpress.php";` go at the beginning OR end of the array? – emersonthis Jun 24 '13 at 16:24
  • That I'm not sure, but for safety I would add it to the end of the array. – Adam Erstelle Jun 24 '13 at 18:13