Non-public sites should generate activity items with hide_sitewide = 1
BuddyPress prevents site activity (posts, comments) from generating activity items when blog_public != 1. This can cause confusion in some case; see #7376.
This block must not happen in all cases, since (for example) the blog activity widget on the home page sometimes shows different content for logged-in users than logged-out. But perhaps there's some combination of factors (groupblog vs non-groupblog, specific blog_public settings, whatever) that cause the activity to be blocked at least sometimes.
I propose that we allow activity to be created in all cases, but set it to hide_sitewide = 1. This'll require a sweep through our various activity listings to ensure that privacy settings are correctly reflected everywhere (off the top of my head, they should be, but it's worth looking).
#3 Updated by Boone Gorges about 1 year ago
- Status changed from Assigned to Testing Required
It turns out that the problem is actually quite specific: only sites with blog_public = 0 ("Discourage search engines...") are affected. All other privacy levels worked as expected, ie their content generated activity items. This is because of some odd hardcoded behavior in BuddyPress. I've proposed some changes there that should make this easier to work around in the future: https://buddypress.trac.wordpress.org/ticket/4831#comment:10
In the meantime, here's a fix for the Commons https://github.com/cuny-academic-commons/cac/commit/183aab16a2b14c774039631677078d7d832973b8. The one functionality decision I had to make was this: if group and site privacy levels differ (public site + private group, private site + public group), what should the privacy level of the activity item be? I opted to go conservative: if either the group or site is non-public, the activity item is non-public too. Note that "public" in the BP activity context means something odd: a "non-public" item can only be viewed on the associated item's activity thread, which is to say when you're looking at the group; for private groups, this means that only members can see it, since only members can view the group.
This needs testing on cdev to ensure that the various combinations of privacy make sense, and that the functionality works as promised.