Activity Broken for buddypress 1.1.2 and wpmu 2.8.5.2

I know this may be off the topic, but any help is greatly appreciate! I have post the same problem on buddypress.org, but I know their support is sometimes quite unpredictable, and lately I have no support answer from them.

Even before the upgrade of wpmu 2.8.5.2, I was using 2.4.8a and buddypress 1.1.2, the problem is that site wide activity, and each member's activity, and rss feed for activity is completely broken. It's not working at all. I remember buddypress 1.1.0 has no problem of such. Is there a way to fix the activity?

  • Richie_KS

    i encounter the similiar problem with wpmu fresh install with couple of demo member already exsited before i install buddypress plugin.

    it seem early members did not get 'sync' with bp member..something like that...did new member's activity created after bp activiate also did not work...

    or you may need to remove widget and re-enter the sitewide widget again in widget panel.

    do you upgrade your bp 1.1.2 from older version(below 1.0) or fresh install start from 1.1.2?...you may need to deacitvate all bp related plugin include buddypress and delete(completely delete wp-content/plugins/buddypress) and reupload the new version again...sometime in most cases like auto-upgrade etc..some core file are missupload...so reupload the whole new buddypress will be recommended...unless you make some core change in buddypress plugin...you may need to take note on that:slight_smile:

    cheers

  • Aaron

    A client of mine is having the same issue after update to bp 1.1.1. I havnt figured it out completely, but tracked down that the activities table was not updated. I manually changed the columns to reflect the new db structure, and that fixed sitewide activity. But now the widget is pulling in HTML on pages or posts, but not on the main page.

    I'm thinking something similar is happening with sitewide posts.

  • argh2xxx

    Richie_KS, I did like what you said, I deactivated the buddypress plugin, rm -rf buddypress 1.1.2 directory, download the buddypress 1.1.2 directory again from buddypress.org, unzip it, move the new buddypress directory to /wp-content/plugins/, rm -rf bp-themes (since bp-themes contained themes that are already in /wp-content/themes/), reactivated the buddypress plugin. Created a test user, and then added a wire post, but activity showed no update at all. I even logged into a test user that was created long time ago, try to add a wire post, and do something else, activity showed old activities from months ago, but recent activities were no where to be found.

  • argh2xxx

    OK, I saw this in bp-activity.php:
    /* Drop the old sitewide and user activity tables */
    $wpdb->query( "DROP TABLE IF EXISTS {$wpdb->base_prefix}bp_activity_user_activity" );
    $wpdb->query( "DROP TABLE IF EXISTS {$wpdb->base_prefix}bp_activity_sitewide" );

    And so I look in the global db and saw there is no bp_activity_user_activity table, and there is no bp_activity_sitewide table. This means it's a good thing since these got dropped.

    Though I saw this

    $sql[] = "CREATE TABLE {$bp->activity->table_name}

    but to my lack of knowledge of programming, I see this and think it's bp_activity_something (but no idea)...

    Looked everywhere and I only saw this in global db wp_bp_activity_user_activity_cached. This table doesn't look like it was created by
    $sql[] = "CREATE TABLE {$bp->activity->table_name}, but I could be wrong because I looked at the part under $sql[] = "CREATE TABLE {$bp->activity ->table_name} and saw similar rows get created and these rows are in my wp_bp_activity_user_activity_cached table.

    For example, in bp-activity.php,

    function bp_activity_install() {
    global $wpdb, $bp;

    if ( !empty($wpdb->charset) )
    $charset_collate = "DEFAULT CHARACTER SET $wpdb->charset";

    $sql[] = "CREATE TABLE {$bp->activity->table_name} (
    id bigint(20) NOT NULL AUTO_INCREMENT PRIMARY KEY,
    user_id bigint(20) NOT NULL,
    component_name varchar(75) NOT NULL,
    component_action varchar(75) NOT NULL,
    content longtext NOT NULL,
    primary_link varchar(150) NOT NULL,
    item_id varchar(75) NOT NULL,
    secondary_item_id varchar(75) NOT NULL,
    date_recorded datetime NOT NULL,
    hide_sitewide bool DEFAULT 0,
    KEY date_recorded (date_recorded),
    KEY user_id (user_id),
    KEY item_id (item_id),
    KEY component_name (component_name)
    ) {$charset_collate};";
    require_once( ABSPATH . 'wp-admin/upgrade-functions.php' );
    dbDelta($sql);

    In my current global db, table wp_bp_activity_user_activity_cached has everything except hide_sitewide row. In my current global db, table wp_bp_activity_user_activity_cached has extra rows that function_bp_activity_install doesn't have such as date_cached and is_private rows.

    Any suggestion? What rows should I add or remove? Am I looking at the right stuff?

    Looked like at the end of the function bp_activity_install(), it has require_once( ABSPATH . 'wp-admin/upgrade-functions.php' );
    dbDelta($sql);

    Let me try to go to wp-admin and click on upgrade button to upgrade all users again to see if this actually fix the db? My guess is buddypress upgrade require you to run upgrade-functions.php?

  • Marcus

    Someone may still find this useful.

    I think MultiDB borked an older BP upgrade I did and went unnoticed. I modified dbDelta to output the SQL changes to a file, put my old database into a fresh, non-multiDB installation and upgraded. This is what I got. Applying these lines did the trick for me.

    Remember, back up before doing any of this! Use at your own risk!

    ALTER TABLE wp_bp_notifications CHANGE COLUMN is_new is_new bool NOT NULL DEFAULT 0;
    ALTER TABLE wp_bp_notifications ADD KEY useritem (user_id, is_new);
    ALTER TABLE wp_bp_activity_user_activity_cached CHANGE COLUMN item_id item_id varchar(75) NOT NULL;
    ALTER TABLE wp_bp_activity_user_activity_cached CHANGE COLUMN secondary_item_id secondary_item_id varchar(75) NOT NULL;
    ALTER TABLE wp_bp_activity_user_activity_cached CHANGE COLUMN hide_sitewide hide_sitewide bool DEFAULT 0;
    ALTER TABLE wp_bp_friends CHANGE COLUMN is_confirmed is_confirmed bool DEFAULT 0;
    ALTER TABLE wp_bp_friends CHANGE COLUMN is_limited is_limited bool DEFAULT 0;
    ALTER TABLE wp_bp_groups ALTER COLUMN status SET DEFAULT 'public';
    ALTER TABLE wp_bp_xprofile_fields ADD KEY field_order (field_order);

  • themarketingcompass

    @Aaron - I've been having an issue on my site where most of my users activity comments aren't being posted on the site - after reading through this I checked within my SQL databse and found all of the activoty updates and noticed something really strange on the most of the recent updates - they are all marked as 'is spam'!

    That would explain why they aren't being posted. The question is - how do I make sure no activity updates are marked as 'is spam' in the database?

    Kind regards

    Ben

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.