Skip to:
Content

BuddyPress.org

Opened 13 years ago

Closed 11 years ago

#4327 closed defect (bug) (duplicate)

My Favorites Count Bug

Reported by: gagan0123's profile gagan0123 Owned by:
Milestone: Priority: normal
Severity: normal Version: 1.5.6
Component: Activity Keywords:
Cc:

Description

Here is a scenario that isn't covered in BuddyPress:
Create an activity(about anything).
Mark it as Favorite
Remove the activity.

Now the favorite count will remain the same since there is nothing handling activity deletion with the fav count reduction in the user meta.
I hope this gets fixed soon, as the previous bug I reported.

Change History (3)

#1 @gagan0123
13 years ago

I think this problem can be fixed by having a meta data in the activity containing the ids of the users who marked it as favorite(just like user meta is having all the ids of the activities they've marked favorite, sort of like reverse mapping).
Then on deletion we can remove the favorites from all the users for that activity in just two queries(one for removing the activity id from all users and one for decrementing the count).

#2 @boonebgorges
13 years ago

  • Milestone changed from Awaiting Review to Future Release

See #3794.

The idea of duplicating favorites data in usermeta and activitymeta is not very appealing - it introduces the possibility of getting something out of sync. A far better solution is for Favorites to be stored in a proper lookup table, either as a true Activity add-on, or as a standalone component.

#3 @r-a-y
11 years ago

  • Keywords needs-patch removed
  • Milestone Future Release deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #3794.

Note: See TracTickets for help on using tickets.