Opened 12 years ago
Closed 12 years ago
#5515 closed defect (bug) (fixed)
Bug when marking activity favorite
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 2.0 | Priority: | normal |
| Severity: | normal | Version: | 2.0 |
| Component: | Core | Keywords: | |
| Cc: | mpa4hu@… |
Description
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?
Change History (4)
#1
@
12 years ago
- Milestone changed from Awaiting Review to 2.0
- Owner set to boonebgorges
- Status changed from new to assigned
Thanks for the report. This is indeed a bug, introduced by changes in #5399, specifically B2 r8132.