Bug #2191

File upload to group doesn't register as activity?

Added by Matt Gold over 9 years ago. Updated over 9 years ago.

Priority name:
Category name:
BuddyPress (misc)
Target version:
Start date:
Due date:
% Done:


Estimated time:


This morning, I uploaded a file to a hidden group, but that the most-recent activity metadata doesn't seem to have registered that as activity. Screenshots attached.


#1 Updated by Boone Gorges over 9 years ago

  • Assignee changed from Boone Gorges to Dominic Giglio
  • Priority name changed from Normal to Low
  • Target version set to 1.4.10
  • Severity changed from Low impact to Trivial

Dom, this would be in the bp-group-documents plugin. Should be a place where it's doing something like groups_update_groupmeta( 'last_active', $time );, but maybe it's not firing at the right time.

#2 Updated by Dominic Giglio over 9 years ago

  • Status changed from Assigned to Resolved
  • % Done changed from 0 to 100


We've talked previously about this plugin being re-written from the ground up so I didn't want to spend too much time on it. Basically it comes down to this: nowhere in buddypress-group-documents was the group's 'last_activity' meta value being updated in the DB.

All activity related updates are contained in the bp_group_documents_record_activity() function on line 63 of buddypress-group-documents/include/activity.php. All of the functions in that file call this function to update the DB, so I just added this one line:

groups_update_groupmeta( $bp->groups->current_group->id, 'last_activity', bp_core_current_time() );

right before the function returns. This addition updates the activity in my local env so I'm marking this as resolved, please re-open if you disagree or see something I've missed.


#3 Updated by Boone Gorges over 9 years ago

Looks great. Thanks, Dom.

Also available in: Atom PDF