Skip to:

Re: Site Wide Activity Widget not working

Jeff Sayre


I should point out that the two tables that the latest trunk drops are not in my database even though I am running 1.0.3. Should I manually recreate the tables and see what happens? If I activated the 1.0.3 plugin it should have recreated those tables don’t you think?

You know, reading your question just made me realize the solution. I should have thought about this before–especially since I referred to it in my first post. For the activity table(s), this constant is what I indicated above:

define ( 'BP_ACTIVITY_DB_VERSION', '1300' );

The “1300” is the key. When you installed the trunk, the constant in bp-activity.php was set to this:

define ( 'BP_ACTIVITY_DB_VERSION', '1716' );

When BP needs to update any of its tables, it does so by incrementing a DB constant. When you log into WPMU’s backend as Site Admin, a routine runs and compares the DB version number in the DB with the one in the BP component code.

Since 1716 is greater than 1300, the update procedure ran when you installed the current trunk version. When you reinstalled (downgraded to) v1.0.3, since the constant stored in the DB was greater than the one indicated in the older version of bp-activity.php, the “upgrade” function did not run.

So, what you need to do is go into the wp_sitemeta table in the DBs backend, and search for the meta_key entry “bp-activity-db-version”. Change the meta_value number for that record to something lower than 1300. Then, log into WPMU’s backend as Site Admin. The upgrade routine will fire this time since 1300 will be greater than the artificial number you just entered. Your old tables will be reinstalled and your widget start working again!

Skip to toolbar