Skip to:
Content

bbPress.org

Opened 7 years ago

Closed 6 years ago

Last modified 6 years ago

#2085 closed defect (fixed)

Private/Hidden Sub Forum Visibily after adding a Parent Category Description

Reported by: netweb Owned by: johnjamesjacoby
Milestone: 2.3 Priority: normal
Severity: normal Version: 2.1
Component: Component - Forums Keywords:
Cc:

Description

Sub forums are no longer shown after adding a description to a hidden or private forum category.

via @royho http://bbpress.org/forums/topic/forums-disappears-if-category-description-is-entered/#post-121002

Screencast showing the issue -> http://screencast.com/t/Gjxt7if0

Repro Steps:

  • Create a Hidden or Private forum category without a description
  • Create a Hidden or Private forum as the child forum of the above category
  • Edit the forum category created above and add a forum desription

Exception: If there is a child forum of the parent and it is 'Public' all forums including any 'Private' or 'Hidden' forums will be shown and is what would be expected behaviour of bbPress

Change History (7)

#1 @johnjamesjacoby
7 years ago

  • Keywords reporter-feedback added
  • Milestone changed from Awaiting Review to 2.3

Is the problem the parent description, or is it the child post status?

#2 @netweb
7 years ago

  • Keywords reporter-feedback removed

Quite sure it is the parent description as that is the only item that is updated that triggers the issue.

If the 'category' forum is created in the first place including a description the issue is non existent:
eg.

  • Create a Hidden or Private forum category WITH a description
  • Create a Hidden or Private forum as the child forum of the above category

Result: Standard expected behavior and all forums, sub forums and descriptions are visible.

#3 @johnjamesjacoby
7 years ago

  • Owner set to johnjamesjacoby

#4 @johnjamesjacoby
6 years ago

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

(In [4597]) In bbp_list_forums(), remove check for subforums meta, and trust the subforums query to do the work.

In the subforums query, avoid using get_posts() and use a new WP_Query object instead. Also fix some return value type-casting.

Fixes #2085.

#5 @netweb
6 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening with updated use case reported here on bbpress.org forums by @Monica4567:

The testing below was performed using /trunk/ which includes the above r4597 patch.

Sub forums are no longer shown after moving private forums to a parent private forum category.

Repro Steps: This is not reproducible with visibility hidden or public

  • Create a forum with attributes visibility = 'private' eg. forumone
  • Create a forum with attributes type = 'category' visibility = 'private' eg. categoryone
  • Edit the first forum to now be a child of the category forum.

Viewing example.com/forums forums list displays correctly
Viewing example.com/forums/categoryone/ forum does NOT list the sub forum forumone

Workaround:

  • Create a forum with attributes type = 'category' visibility = 'private' eg. categorytwo
  • Create a forum with attributes visibility = 'private' using the above as the parent eg. forumtwo

Viewing example.com/forums forums list displays correctly
Viewing example.com/forums/categorytwo/ forum correctly lists the sub forum forumtwo

Workaround Exceptions:

  • If you used the above workaround WITHOUT adding a description to categorytwo then edit the forum category to now include a description the sub forum forumtwo again will no longer be visible at example.com/forums/categorytwo/
  • Likewise if you used the above workaround WITH a description to categorytwo then edit the forum category to now REMOVE the description the sub forum forumtwo again will no longer be visible at example.com/forums/categorytwo/
  • If you used this workaround to rename your old categories & forums names/slugs and created a new set of categories/forums names/slugs with the goal of moving your topics into this new structure that appears at this stage to be working as soon as you move the topics from the 'old' forums to these 'new' forums we lose sub-forum visibility again.
Last edited 6 years ago by netweb (previous) (diff)

#6 @johnjamesjacoby
6 years ago

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

(In [4723]) On single forum view, do not check for forum count when trying to query sub forums. Fixes #2085.

#7 @johnjamesjacoby
6 years ago

(In [4724]) When calculating the child forum count, check all post ID's with matching parents instead of only public ones. Helps fix bug causing private and hidden forums to not appear. In the future, this could be handled better, without hardcoded post status checks. See #2085.

Note: See TracTickets for help on using tickets.