BuddyDev

Search

[Resolved] What is Expected Behavior when Adding New Groups to Existing Subsites?

Tagged: 

  • Participant
    Level: Initiated
    Posts: 6
    Matt on #42645

    While the Multi Network plugin itself seems to work, I am trying to better understand its designed behavior. Specifically we are wanting to have unique BP groups for each subsite of the network. While the groups are “separated” between subsites at the time of creation, we are experiencing an issue where the the last group ID of a prior subsite (regardless of the subsite) will be overwritten per the globally sequential order of group IDs.

    So for example if originally we have 6 Groups spread evenly across 3 subsites:

    BP_Group_ID | Group_Title | Subsite_ID
    1 | Test 1 | 1
    2 | Test 2 | 1
    3 | Test 3 | 2
    4 | Test 4 | 2
    5 | Test 5 | 3
    6 | Test 6 | 3

    and want to add a new Group (i.e. Group 7A) to Subsite 1, then Subsite 2’s Group 3 will be overwritten like so

    BP_Group_ID | Group_Title | Subsite_ID
    1 | Test 1 | 1
    2 | Test 2 | 1
    3 | Test 7a | 1 <New Entry
    3 | Test 7a | 2 <Matching ID Altered
    4 | Test 4 | 2
    5 | Test 5 | 3
    6 | Test 6 | 3

    Where a new group is created appropriately is subsite 1, but the other subsite’s group_ID=3 info is overwritten.

    Is this expected behavior? If so, we were thinking that (hypothetically at least) we could manually start each subsite’s first Group ID to increase in increments of 100 allowing for appropriate room for at least 99 more groups in that subsite, so for example

    BP_Group_ID | Group_Title | Subsite_ID
    100 | Test 1 | 1
    101 | Test 2 | 1
    102 | Test 7a | 1
    200 | Test 4 | 2
    201 | Test 4 | 2
    300 | Test 5 | 3
    301 | Test 6 | 3

    In reference to the scenario above, can you please confirm the expected behavior when adding new groups to existing subsites?

    Thank you!
    Matt

  • Keymaster
    (BuddyDev Team)
    Posts: 21463
    Brajesh Singh on #42646

    Hi Matt,
    Welcome to BuddyDev forums.

    1. If you have the multi network plugin enabled, all the groups on each of the sub site are separate.

    This plugin adds sub site specific prefix to the BuddyPress tables. That means, each sub site have their own groups table and the groups are independent of other sub sites( and each sub site group start with id 1). The ids do not conflict.
    If ids are conflicting, there is some issue with the configuration.

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 6
    Matt on #42652

    Thanks Brajesh, you’re right. Checking against another site I’d used this on, the described behavior was not observed.

    Is it possible I need to delete old tables in my DB Manager for the site in question? It was not configured immediately with the Multi Network plugin, but since its addition I have

    1) deactivated BuddyPress on each subsite
    2) added bp-custom with enable_multi
    3) network activated Buddy Multi Network
    4) single site activated BuddyPress on each subsite
    5) gone to settings>BuddyPress and clicked “save” on each subsite

    multiple times, in various sequences, however, I cannot get the groups to behave correctly. They do not all appear across subsites (so there is some “independence”), but they are being overwritten and the ID’s coming into conflict across subsites.

  • Participant
    Level: Initiated
    Posts: 6
    Matt on #42653

    Which by the way, I do see the subsite-specific tables for my groups.

  • Keymaster
    (BuddyDev Team)
    Posts: 21463
    Brajesh Singh on #42654

    Hi Matt,
    Thank you.

    Your steps are correct.

    1. is bp-custom.php in wp-content/plugins directory?
    2. Are you creating groups from front end or using some code?
    3. Have you tried it with default WordPress theme and BuddyPress template pack? just to be sure that the theme is not interfering in case you are using a custom theme.

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 6
    Matt on #42655

    1) yes it is – exactly the same as my working site
    2) from the front end
    3) The broken site is actually using the same theme as my working site.

  • Participant
    Level: Initiated
    Posts: 6
    Matt on #42656

    Ugh….Thank you, Brajesh. It was actually a caching setting on our server (Redis in our case). I deactivated and everything started to make sense.

    Thanks again!
    Matt

    • This reply was modified 6 months, 3 weeks ago by Matt.
  • Keymaster
    (BuddyDev Team)
    Posts: 21463
    Brajesh Singh on #42662

    Thank you Matt. That was going to be my next guess 🙂

    Regards
    Brajesh

The topic ‘ [Resolved] What is Expected Behavior when Adding New Groups to Existing Subsites?’ is closed to new replies.

This topic is: resolved