Skip to:
Content

BuddyPress.org

Opened 6 weeks ago

Closed 4 weeks ago

#9238 closed defect (bug) (fixed)

Public BuddyPress Groups Require 'invite_status' Meta Key to Enable Joining – Should Only Apply to Private and Hidden Groups

Reported by: vapvarun's profile vapvarun Owned by: imath's profile imath
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Groups Keywords:
Cc:

Description

When creating groups using the BuddyPress CLI or other programmatic methods, the "Join" button for public groups does not function unless the 'invite_status' meta key is manually added with the value 'members'. This behavior is inconsistent because public groups should not require an invite system, as they are open to anyone.

The invite_status meta key is relevant for private and hidden groups, where invitations restrict membership. However, public groups should bypass this check, and the invite_status key should not be required for the group join process.

Steps to Reproduce:

Create a public group using the BuddyPress CLI or programmatically (without manually adding the invite_status meta key).

Attempt to join the public group via the "Join" button.
Notice that the "Join" button does not function unless the invite_status key is manually injected with the value 'members'.

Expected Behavior:
For public groups, the invite_status meta key should not be required for the join functionality to work.
The join action should work seamlessly for public groups without any invite-related checks.

Actual Behavior:
The "Join" button does not work for public groups unless the invite_status meta key is manually inserted.

Suggested Fix:
Modify the groups_action_join_group() function in BuddyPress to only check for the invite_status meta key for private and hidden groups.
For public groups, the invite_status check should be skipped entirely to ensure that the join process works as expected.

Possible Impact:
Public groups will function correctly without requiring manual meta key injections.
This will prevent confusion and errors when creating public groups via the CLI or programmatically, improving consistency in the BuddyPress core functionality.

Attachments (1)

Groups-–-bpcli-09-26-2024_12_00_AM.png (233.6 KB) - added by vapvarun 6 weeks ago.
Error message when you try to join such groups

Download all attachments as: .zip

Change History (2)

@vapvarun
6 weeks ago

Error message when you try to join such groups

#1 @imath
4 weeks ago

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

In 14043:

Move the invite_status group meta check out of groups_join_group()

[13874] introduced a regression where groups whose creation process is abandoned become unjoinable & or when using the WP BuddyPress CLI to create groups.

To avoid this, we now perform the check higher up the chain, namely in the places in BuddyPress where groups_join_group() is called.

Props boonebgorges, vapvarun.

See #9241 (trunk)
Fixes #9238
Closes https://github.com/buddypress/buddypress/pull/381

Note: See TracTickets for help on using tickets.