Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)

  • mlwilkerson
    Participant

    @mlwilkerson

    I posted the final bit of my solution to this problem over on BBPress Ticket #2191 here:
    https://bbpress.trac.wordpress.org/ticket/2191#comment:17

    It’s filter code that helps bbPress to know what BuddyPress group is associate with any activities that might happen in a sub-forum.

    So the BuddyPress group still has just one forum, but that one forum can have multiple sub-forums.


    mlwilkerson
    Participant

    @mlwilkerson

    Regarding my caveat above (that BP activities were not showing up in the BP news feed of a non-admin user), I have discovered that two other plugins I have been using are effecting the behavior here:

    1. BuddyBoss Wall: this is not breaking anything, but it does change what the activity stream looks like to the user. In particular, it adds a “news stream” view, similar to Facebook. So for anyone reading this later wondering what I meant by “news stream” above, that’s apparently a BuddyBoss Wall specific view.
    2. BuddyPress Activity Privacy: It was when I disabled this plugin that the non-admin user started seeing the activity updates in his news feed as I would have expected. And I’m not saying that this plugin was breaking anything necessarily—could easily have just been some configuration mixup on my part. But it was time for me to remove this plugin anyway because it was adding unnecessary complexity to my site.

    So removing the Activity Privacy plugin resolved the caveat. Scenario 4 is now working for me just as I need it to.


    mlwilkerson
    Participant

    @mlwilkerson

    Thanks for the suggestion, @earl_d. I had tried it already, but at your suggestion, I tried again. I did find one user error on part that was partially responsible for the fact that it didn’t work previously (the root group forum had a visibility of “Hidden”, which breaks makes the topic inaccessible to non-admin users). But still, your suggestion didn’t work for me.

    TLDR: I got it working, mostly, though not entirely, and not using the approach you suggested, but your suggestion sent me down a fruitful path that ended up working out. See Scenario 4 below. Posting all of this for the benefit (hopefully) of others that may come along some day trying to work through the same issue.

    (BTW, the way I interpreted your suggestion was that I should set the top-level group forum to have type=category instead of type=forum. In any case, here are my results…)

    Versions

    1. WordPress: 4.6
    2. bbPress: 2.5.10
    3. BuddyPress: 2.6.2

    Scenario 1:
    (a) Create the BP Group without an associated forum.
    (b) Separately, later, create a forum with type=category
    (c) Go to the BP Group’s settings to try and associate the Forum to the BP Group

    Fail: The forum drop-down has the category forum greyed out, probably because it’s type=category.

    Scenario 2:
    (a) Create the BP Group *with* an associated Forum (which will automatically have type=forum)
    (b) Separately, later, go edit that new Forum’s type, setting type=category
    (c) Navigate to the forum’s page within the group. Say’s “the forum is empty.”
    (d) Add a new sub-forum type=forum
    (e) Create Topic A in the sub-forum
    (f) Navigate to the group’s forum again (as a non-admin user)

    Expected: Topic A should appear
    Actual: Topic A does not appear

    (g) How about directly linking to Topic A? Maybe Topic A is accessible to the user, but somehow the template simply isn’t outputting it under (f) above?

    Expected: Topic A should be accessible
    Actual: Topic A is accessible

    Therefore: the user can see and interact with Topic, but BuddyPress doesn’t know about it as being part of the forum.

    In retrospect, what seems to have actually happened here is that the original group of type=forum was regenerated and associated with the BP Group. So our topic is probably not showing up in the Group because it’s parent is the sub-forum of a forum the forum that is no longer associated with the group.

    Scenario 3:
    I thought: If sub-forums don’t work, then maybe multiple sibling forums could work. The Settings page for BuddyPress obviously only allows you to attach one forum, though the data model seems to allow for multiples. However, after slogging through the code, it’s clear that the current version of bbPress thwarts the adding of multiple forums. In at least two places that I saw in the code (like includes/extend/buddypress/groups.php), you have something like this:

    // No support for multiple forums yet
    $forum_id = (int) ( is_array( $forum_ids ) ? $forum_ids[0] : $forum_ids );

    So even if you were to completely bypass the user interface and do a hack of some kind to attach multiple forums to the group, this sort of code would thwart the hack.

    Scenario 4:
    So what if we go back to Scenario 1, but set up the initial group-associated forum with type=forum, instead of type=category. It would then be selectable in the admin UI, or could just be created automatically upon creation of the group.

    (a) Create a new private group with an associated forum
    (b) Go create a new private forum and set its parent to be that initial group forum
    (c) Create a topic in the sub-forum
    (d) Navigate to the forum within the group as a non-admin user

    Expected: The sub-forum should be visible and navigable
    Actual: It is! The user can click through, see the topic within the sub-forum, and reply on it.

    Conclusion: Success! This is the best and most functional scenario thus far.

    Key differences from what I’d tried and failed before:

    1. All forums involved have to be set to Private visibility. If Hidden, then some aspects of this may success, but others will fail.
    2. The forum that is associated with the group will have to be type=forum, not type=category. But I wrote a little plugin that disallows creation of new topics within a forum, without having to mark it CLOSED (thereby also disabling comments). So this will functionally turn this top-level group forum into a category/container forum anyway

    Caveat: I have noticed that when my admin user replies on the topic within the sub-forum, the BP Activity is created as expected (seen in the admin screen under Activities), but it doesn’t show up in the BP news feed of my non-admin test user. The other way works, though: if my non-admin user posts a reply to that topic, then this activity shows up in the news feed of my admin user. I need to debug that.


    mlwilkerson
    Participant

    @mlwilkerson

    I have the same need/concern.

    Unfortunately, I think the suggestion from @openring to use https://wordpress.org/plugins/bbp-private-groups/ won’t work. I’ve looked closely at that plugin. It doesn’t seem to have anything to do with BuddyPress groups. Rather, it seems to have to do with creating it’s own role based access groups. So that’s a way of having more access control over your forums, which is valuable in and of itself, but it doesn’t pertain to BuddyPress.


    mlwilkerson
    Participant

    @mlwilkerson

    Well, what do you know: I just found a fix for my problem here:
    https://buddypress.trac.wordpress.org/ticket/4824#comment:4

    (I had seen that recent fix from @pareshradadiya previously, but hadn’t noticed that it was a recent update to a 3 year old thread. So, figuring it might actually be current and relevant, I gave it a try and it worked.)


    mlwilkerson
    Participant

    @mlwilkerson

    I’m having the same problem after upgrading to WordPress 4.5.2. I didn’t see the problem prior to that.

    Have you found a solution yet?

Viewing 6 replies - 1 through 6 (of 6 total)
Skip to toolbar