[buddypress-trac] [BuddyPress Trac] #6986: Bug : Duplicate Group Names are tolerated in Create Group

buddypress-trac noreply at wordpress.org
Wed Mar 30 18:32:04 UTC 2016


#6986: Bug : Duplicate Group Names are tolerated in Create Group
----------------------------------------+-----------------------------
 Reporter:  valuser                     |       Owner:
     Type:  enhancement                 |      Status:  new
 Priority:  normal                      |   Milestone:  Future Release
Component:  Component - Groups          |     Version:  2.5.0
 Severity:  normal                      |  Resolution:
 Keywords:  needs-patch good-first-bug  |
----------------------------------------+-----------------------------
Changes (by boonebgorges):

 * keywords:   => needs-patch good-first-bug
 * type:  defect (bug) => enhancement
 * component:  API => Component - Groups
 * milestone:  Awaiting Review => Future Release


Comment:

 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.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6986#comment:2>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list