Fixed in https://github.com/cuny-academic-commons/cac/commit/5c4eb7a3752c41b779b80debd8004c0f6be2ac35.
If a site is private, the fix will hide the blog-related activity item from being displayed sitewide.
Boone, I decided to add the fix directly into the bp-mpo-activity-filter
plugin as other sites using the plugin might benefit from it. I've also added a pull request here. In the PR, I note that BuddyPress will block the activity item from saving if the site visibility option is set to Discourage search engines from indexing this site
. We might want to mirror what BuddyPress is doing if the site's visibility setting is private, but I opted to hide the activity item sitewide for now.
I'm also going to run a script similar to https://redmine.gc.cuny.edu/issues/15134#note-5 to address blog activity items that should be hidden sitewide. Here's the MySQL query: select a.id from wp_bp_activity a left join wp_blogs b on (a.item_id = b.blog_id) where a.hide_sitewide = 0 and a.component = 'blogs' and b.public < 1
. I'll run the script to switch these activity items over tomorrow.
Update:
In the PR, I note that BuddyPress will block the activity item from saving if the site visibility option is set to Discourage search engines from indexing this site
. We might want to mirror what BuddyPress is doing if the site's visibility setting is private
Disregard what I said here. #8075 allows for activity recording for sites with the visibility option set to "Discourage search engines from indexing this site"
or (blog_public = 0
), so we do not need to follow what BuddyPress does.