Skip to:
Content

bbPress.org

Opened 11 years ago

Closed 11 years ago

#2349 closed defect (bug) (fixed)

bbP's internal private and forum IDs not updated when adding a forum into BuddyPress

Reported by: r-a-y's profile r-a-y Owned by: johnjamesjacoby's profile johnjamesjacoby
Milestone: 2.4 Priority: normal
Severity: normal Version: 2.2
Component: Extend - BuddyPress Keywords: has-patch
Cc:

Description

If you add a forum to a private or hidden group in BuddyPress, bbPress does not record that forum ID into its '_bbp_{visibility}_forums' DB option.

This creates problems as the Recent Topics / Replies widgets, which rely on these DB options, will show private forum content to the public.

To address this, I decided to move the utility function - bbp_admin_repair_forum_visibility() - from admin/tools.php into forums/functions.php so we can use it in a more general sense like I have in /extend/buddypress/group.php.

Yes, this is more of a brute-force way of fixing the issue, but this also ensures that all forum IDs in bbPress are updated.

If moving the bbp_admin_repair_forum_visibility() function isn't desired, then some form of update_option() approach will be needed.

Attachments (1)

2349.01.patch (7.2 KB) - added by r-a-y 11 years ago.

Download all attachments as: .zip

Change History (2)

@r-a-y
11 years ago

#1 @johnjamesjacoby
11 years ago

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

In 5017:

Introduce bbp_repair_forum_visibility() and use it:

  • when creating a new BuddyPress Group Forum
  • in the bbp_admin_repair_forum_visibility() tool

Fixes issues with new group forums not bumping the private/hidden forum ID's. Props r-a-y. Fixes #2349.

Note: See TracTickets for help on using tickets.