Opened 9 years ago
Closed 9 years ago
#6484 closed defect (bug) (fixed)
If post/activity comment sync is on, activity comment is never deleted when corresponding post comment is.
Reported by: | imath | Owned by: | imath |
---|---|---|---|
Milestone: | 2.4 | Priority: | high |
Severity: | major | Version: | 2.0 |
Component: | Blogs | Keywords: | has-patch commit |
Cc: |
Description
I had almost finished building a first patch for #6482 when i discovered something very problematic with the "post comment sync activity comment feature".
having ! bp_disable_blogforum_comments()
(in other words comment sync is on), let's say i create a post, i comment it, then i add a reply to this comment.
If i trash the parent comment, i still have the activity reply and the activity comment is now a spam. Which is the way it's built..
Now, let's say i finally choose to delete permanently the parent comment from the Administration > Comments > Trash view. The post comment is deleted, but the activity comment is still a spam and the activity reply is not deleted (neither the corresponding comment).
In this scenario, i saw other annoying side effects.. But it looks like if you trash a post comment, then delete it permanently, the corresponding activity comment is never deleted but remains a spam.
I'm not sure but i think it's there since the introduction of the feature.
The attached patch is fixing the issue. But i think there might be a need for a repair tool to remove spammed activity comments having no corresponding post comment.
Attachments (2)
Change History (6)
#2
@
9 years ago
r-a-y in this part you are using the spam column to fake the trash. I a comment is untrash you unspam :)
So i'd say why not but we would need to compare activity meta with comment meta before deleting.
Good catch, imath!
Maybe we should do something similar to
wp_scheduled_delete()
. Delete activity spam after the days set in theEMPTY_TRASH_DAYS
constant.