Skip to:
Content

BuddyPress.org

Opened 5 years ago

Closed 3 years ago

#6986 closed enhancement (maybelater)

Bug : Duplicate Group Names are tolerated in Create Group

Reported by: valuser Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.5.0
Component: Groups Keywords: needs-patch, good-first-bug, trac-tidy-2018
Cc:

Description

With BuddyPress, at the moment, duplicate Group Names are allowed to be created.

If this could be avoided by some simple adjustments to the plugin I'd recommended you do so.

For now @shanebp has provided https://gist.github.com/shanebp/72a0c6fe7ffb6f9c1424a30bdb455d4f an addition to theme's functions.php.

This picks up/disallows duplicate group names on Group Creation so that the user can adjust the name.

Change History (5)

#1 @henry.wright
5 years ago

Hi valuser

I'm not sure this is a bug; instead, it is more of a feature. Currently I think digits are appended to the name to make a unique slug. This allows for multiple groups to have the same "display" name, yet still be unique.

That said I can see how totally unique groups (display names) would be useful.

#2 @boonebgorges
5 years ago

  • Component changed from API to Component - Groups
  • Keywords needs-patch good-first-bug added
  • Milestone changed from Awaiting Review to Future Release
  • Type changed from defect (bug) to enhancement

Yeah, I'd argue that this is a feature, not a bug.

However, I can definitely see how some communities would want names to be unique. It would be nice for BP to make it easier to enforce uniqueness. (Maybe with user display names too, but that's a different story.)

I'd suggest a filter at the level of groups_action_create_group() - IMO groups_create_group() shouldn't make such a check - that looks something like:

if ( ! apply_filters( 'bp_groups_allow_duplicate_group_names', true ) ) {
    // Do something to check whether the group name exists
    if ( a group exists by this name ) {
        bp_core_add_message( 'A group by this name already exists', 'error' );
        bp_core_redirect( ... );
    }
}

On a semi-related note, it would be super cool to have asynchronous validation of group creation fields. We could check for duplicate group names, and also show users when a slug will result in a clash - in many cases, the user may decide to change the group slug. UX here could be modeled on the sample-permalink interface when creating a new WP post.

#3 @valuser
4 years ago

The caution on this, i now think, was well founded!
The introduction of group types, imho, changes a lot.
Groups with the same name but with different type classification is real life!
So if type was classified by location a bp install could have a solar-energy group in NY and a solar-energy group in SF.
That would be normal and actually beneficial.

Perhaps what needs to be to be avoided now is duplicate names for groups of the same bp group type.

Version 0, edited 4 years ago by valuser (next)

#4 @DJPaul
3 years ago

  • Keywords trac-tidy-2018 added

We're closing this ticket because it has not received any contribution or comments for at least two years. We have decided that it is better to close tickets that are good ideas, which have not gotten (or are unlikely to get) contributions, rather than keep things open indefinitely. This will help us share a more realistic roadmap for BuddyPress with you.

Everyone very much appreciates the time and effort that you spent sharing your idea with us. On behalf of the entire BuddyPress team, thank you.

If you feel strongly that this enhancement should still be added to BuddyPress, and you are able to contribute effort towards it, we encourage you to re-open the ticket, or start a discussion about it in our Slack channel. Please consider that time has proven that good ideas without contributions do not get built.

For more information, see https://bpdevel.wordpress.com/2018/01/21/our-awaiting-contributions-milestone-contains/
or find us on Slack, in the #buddypress channel: https://make.wordpress.org/chat/

#5 @DJPaul
3 years ago

  • Milestone Awaiting Contributions deleted
  • Resolution set to maybelater
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.