Skip to:
Content

Opened 2 years ago

Last modified 6 weeks ago

#3794 new defect (bug)

Deleted activity items remain favourited

Reported by: ewebber Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 1.5.1
Component: Activity Keywords:
Cc:

Description

When an activity item that has been favourited is deleted, the favourite count is not removed from a users favourite count - as that item no longer exists it cannot be unfavourited.

Change History (3)

comment:1 boonebgorges2 years ago

  • Component changed from Core to Activity
  • Milestone changed from Awaiting Review to Future Release

Yeah, this sounds about right.

Unfortunately it'll be next to impossible to solve. We currently store a user's activity favorites in usermeta as an array. There's no way to query (eg) how many times an activity item has been favorited, or by whom. So there's no way to loop through those users and delete the item from the activity favorites list.

Probably this will have to wait until such time as the favorites system is rewritten into something a bit more elegant. (Either that, or we'll have to start keeping track in activity_meta of the users who have favorited an item.)

comment:2 johnjamesjacoby2 years ago

Activity meta will get pretty crowded this way, and there isn't an index on the meta value so querying per user unfortunately wouldn't scale well.

Ideally favorites would be rewritten as its own component, more robust like what Paul is working on in BP Labs.

comment:3 mpa4hu6 weeks ago

BUMP? can I do this here?

Since I think this is quite important.

Note: See TracTickets for help on using tickets.