Opened 14 years ago
Last modified 8 years ago
#2239 new defect (bug)
if an activity is hidden from sitewide its children (comments) are not hidden as well
Reported by: | francescolaffi | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Contributions | Priority: | normal |
Severity: | normal | Version: | |
Component: | Activity | Keywords: | |
Cc: | francescolaffi |
Description
I think there is no way to reproduce this from the front end, I found this problem adding and updating activities through a plugin, this is how to reproduce with some code:
- create an activity using bp_activity_add() and the argument hide_sitewide set to false.
- post some comments to that activity (comments inherit the hide_sitewide flag)
- update that activity using bp_activity_add(), this time the argument hide_sitewide set to true.
-result: the activity is hidden from sitewide but the hide_sitewide flag is not updated in its children, so the comments are not hidden
Change History (2)
Note: See
TracTickets for help on using
tickets.
I agree that it would be better to have this done automagically, but from looking at the code, I believe that everything is behaving exactly as intended. I'm still trying to fully grasp what's going on in this part of the code, but from what I can tell everything is as it should be. Until this functionality is purposed for the front end I'm guessing it's not going to get a whole lotta love. However, you can still get the hide_sitewide flag for the comment tree updated.
In your update function, you could do something like this:
This is essentially the same thing that would be done if it were to be added to core.