Skip to:
Content

BuddyPress.org

Opened 5 years ago

Closed 3 months ago

#8212 closed enhancement (maybelater)

Do not use random number for resolve slug group conflict

Reported by: exoconsult's profile ExoConsult Owned by:
Milestone: Priority: low
Severity: trivial Version: 1.0
Component: Groups Keywords: reporter-feedback 2nd-opinion
Cc:

Description

Hello,

An enhancement could be made on how slug of a group is created when there's a conflict (see groups_check_slug method in the file bp-groups-function.php - line 439)

At the moment, a random number is added at the end of the existing "default" slug group. But a better choice could be to iterate on a number until a non existing slug is found (the same way wordpress handles slug of a post).

See Worpdress method "wp_unique_post_slug" in file "wp-includes\post.php" (line 4294)

Regards,
Didier

Change History (3)

#1 @johnjamesjacoby
5 years ago

  • Component changed from Core to Groups
  • Keywords reporter-feedback 2nd-opinion added
  • Milestone changed from Awaiting Review to Under Consideration
  • Priority changed from normal to low
  • Severity changed from normal to trivial
  • Version set to 1.0

a better choice could be to iterate on a number until a non existing slug is found

Why is an incremental number better than a random one?

The reasons random slugs are used is because group slugs can be changed later, and random slugs cannot be enumerated through as easily if someone is trying to guess whether or not a group exists, either before or after it has been finalized by the creator.

WordPress sites generally have fewer content creators, making incremental numbers simpler to manage because authors are usually working together anyways. In a Community site, where Group creation is likely to be open to all Members, a random number also dramatically reduces the probability of a slug collision, in the event multiple Members happen to be attempting to create a Group with the same base slug at around the same time.

Open to hearing different opinions and suggestions here though!

#2 @ExoConsult
5 years ago

Yeah. That's a good point of view...

#3 @espellcaste
3 months ago

  • Milestone Under Consideration deleted
  • Resolution set to maybelater
  • Status changed from new to closed

I agree with John. Also, this has not been a problem so far.

I'll resolve this as maybelater.

Note: See TracTickets for help on using tickets.