[buddypress-trac] [BuddyPress Trac] #5515: Bug when marking activity favorite

buddypress-trac noreply at wordpress.org
Fri Apr 4 19:28:41 UTC 2014


#5515: Bug when marking activity favorite
--------------------------+-----------------------------
 Reporter:  mpa4hu        |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Core          |    Version:  2.0
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 Well, at least I think this is a bug.

 Try to favorite an activity which was not favorited before.

 This should fail here (bp-activity-functions.php)

 {{{
         // Update activity meta counts
         if ( true === bp_activity_update_meta( $activity_id,
 'favorite_count', $fav_count ) ) {
                 var_dump('asdasd');
                 // Execute additional code
                 do_action( 'bp_activity_add_user_favorite', $activity_id,
 $user_id );
                 // Success
                 return true;
         // Saving meta was unsuccessful for an unknown reason
         } else {
                 // Execute additional code
                 do_action( 'bp_activity_add_user_favorite_fail',
 $activity_id, $user_id );
                 return false;
         }
 }}}


 `bp_activity_update_meta` is not equal to true.


 I have tested this with buddypress 1.9.2 but works fine, but with lastest
 verion (beta from svn) this will fail. (tested with lastest fresh wp
 install and default buddypress theme)

 I tried my best to debug why would this happen but had no success.
 bp_activity_update_meta indeed happeens but does not return true, so
 things attached to `bp_activity_add_user_favorite` action will not
 execute.

 interestingly enough if you unfavorite it and then favorite it again, this
 will work.

 Do you see same?

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5515>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list