Skip to:
Content

Opened 12 months ago

Closed 12 months ago

Last modified 6 months ago

#2327 closed defect (fixed)

BP activity hide_sitewide not correctly reflecting associated group privacy status

Reported by: boonebgorges Owned by: johnjamesjacoby
Milestone: 2.3.2 Priority: high
Severity: major Version: trunk
Component: BuddyPress Keywords: commit
Cc: stephen@…

Description (last modified by johnjamesjacoby)

The bbp_is_forum_public() check in https://bbpress.trac.wordpress.org/browser/trunk/includes/extend/buddypress/activity.php#L427 is not working properly. This method appears to run twice on topic creation - once when the topic is created, and then again on the bbp_new_topic hook. The first time around, the $forum_id variable is set to 0, so ! bbp_is_forum_public() check is returning true, presumably because forum 0 does not exist and therefore is not public. The second time, the correct $forum_id is getting passed through, but its return value is not respecting the group's status (public vs private/hidden).

I haven't dug any deeper, as I'm not sure how bbPress's forum privacy is set against BP group privacy, and I figured you might know just where to look :)

See https://buddypress.trac.wordpress.org/ticket/4976

Change History (14)

comment:1 johnjamesjacoby12 months ago

  • Description modified (diff)

comment:2 kraigg12 months ago

  • Cc kraigg@… added

comment:3 johnjamesjacoby12 months ago

  • Cc kraigg@… removed
  • Keywords commit added
  • Milestone changed from Awaiting Review to 2.3.2
  • Owner set to johnjamesjacoby

Able to duplicate. Fix imminent. For 2.3.2.

comment:4 johnjamesjacoby12 months ago

  • Resolution set to fixed
  • Status changed from new to closed

In 4881:

In the BuddyPress Activity extension, move _update() methods from 'wp_insert_post' onto 'edit_post' action to prevent running them on topic/reply creation accidentally. Fixes bug causing hide_sitewide to incorrectly be set to true on some installations. Also some code clean-up and additional type-casting where appropriate. Fixes #2327 (trunk)

comment:5 johnjamesjacoby12 months ago

In 4882:

In the BuddyPress Activity extension, move _update() methods from 'wp_insert_post' onto 'edit_post' action to prevent running them on topic/reply creation accidentally. Fixes bug causing hide_sitewide to incorrectly be set to true on some installations. Also some code clean-up and additional type-casting where appropriate. Fixes #2327 (2.3 branch)

comment:6 kraigg12 months ago

Thanks for the fix with bbPress 2.3.2, but I found a really strange related issue.

Posting new topics and replies to existing private group forums still show up in the activity stream.

But if I create new private group forums using the latest bbPress 2.3.2, the topics and replies in these newly created private groups are correctly hidden in the activity stream.

I double-checked the existing private groups and the new private groups, and the settings are identical. I also tried to use the Tools > Forums to recaculate and resync the forums, but the problem remains.

comment:7 petervandoorn8 months ago

This is still an issue for me. BP 1.8 with bbPress 2.3.2 on WP 3.6 still sees forum posts in Private groups appearing in non-group members’ activity streams! In my case, these groups & forums were set up in BP 1.6 and then migrated over to bbPress 2.3.2 when BP hit 1.7.

comment:8 vogelsang8 months ago

I got this problem as well. I have migrated from Drupal and afterwards the posts from the old private forums shows up on the user profiles after I made them private. New private forums (made after the migration) works fine.

I have done full repairs of the forum before and after I made my old drupal forums private. I haven't looked into the db for explanations yet.

I am using bbpress 2.3.2, WP 3.6, and buddypress 1.8.1.

comment:9 netweb8 months ago

  • Cc stephen@… added

I am wondering if there is something not quite right with tools recount with an imported _bbp_ value conflicting somewhere, need to dig around in the database and take a look some SQL examples or new private forums/topics vs imported private forums/topics.

comment:10 petervandoorn8 months ago

Update: bbPress 2.4 does not fix the bug!

comment:11 vegaskev6 months ago

Just wanted to note that I have an installation exhibiting the exact same issues. My private bbpress forums inside of private buddypress groups are visible to all members, even though they are not members of any groups or forums within the installation.

I have double-checked and all groups and forums are set to private.

I also, migrated from BP to bp & bbpress when bp 1.7 was released.

Seriously think this ticket should be reopened. I am running BuddyPress 1.8.1 and bbPress 2.4.1

Last edited 6 months ago by vegaskev (previous) (diff)

comment:12 vegaskev6 months ago

  • Priority changed from normal to high

comment:13 netweb6 months ago

@vegaskev

What happens if you run the following repair tools from /wp-admin/tools.php?page=bbp-repair

Recalculate private and hidden forums
Repair BuddyPress Group Forum relationships

comment:14 netweb6 months ago

  • Just installed BuddyPress v1.6.5 with bbPress Group Forums
  • Migrated from bbPress Group Forums to bbPress v2.4.1 per this doc
  • Cannot see any private/hidden posts to groups or forums, seeing only what I expect I should see.
  • Upgraded BuddyPress from v1.6.5 to v1.7.3, same, everything still as expected
  • Upgraded BuddyPress from v1.7.3 to v1.8.1, same, everything still as expected
  • All of the above was done browsing the site not logged in, i.e. generic website visitor
  • Created a new user, standard with no changes to out of the box permissions/roles etc.
  • User joined the open 'Public Group' and I still only see what expect to see. Cannot see any new updates, topics, replies etc made to the 'hidden' or 'private' groups or forums of the site.

Hardest thing here is we are not able to reproduce this issue, not saying it isn't happening.

Try the recalc tools I listed above, disable all other plugins except bbPress & BuddyPress, use WordPress' Twenty Thirteen theme, share some links to your site showing examples of where things are showing as not working as expected.

Note: See TracTickets for help on using tickets.