Project

General

Profile

Bug #15216

Blog posts and comments from private sites shouldn't be visible in sitewide activity stream

Added by Raymond Hoh 4 months ago. Updated 4 months ago.

Status:
Resolved
Priority name:
Normal
Assignee:
Category name:
BuddyPress (misc)
Target version:
Start date:
2022-01-24
Due date:
% Done:

0%

Estimated time:

Description

Follow-up to #15134 and #14223.

If a site has set their privacy setting to either "I would like my site to be visible only to registered users of the CUNY Academic Commons", "I would like my site to be visible only to users I add to it" or "I would like my site to be visible only to its Admins", BuddyPress will record blog post and comment activity items for this site as public.

Fix coming shortly.


Related issues

Related to CUNY Academic Commons - Feature #8075: Non-public sites should generate activity items with hide_sitewide = 1Resolved2017-05-01

History

#1 Updated by Raymond Hoh 4 months ago

  • Status changed from New to Staged for Production Release

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.

#2 Updated by Raymond Hoh 4 months ago

  • Related to Feature #8075: Non-public sites should generate activity items with hide_sitewide = 1 added

#3 Updated by Boone Gorges 4 months ago

Thanks for catching this, Ray.

#4 Updated by Boone Gorges 4 months ago

  • Status changed from Staged for Production Release to Resolved

Also available in: Atom PDF