Skip to:
Content
Pages
Categories
Search
Top
Bottom

Buddypress user can create a group which already existed


  • vidivici123
    Participant

    @vidivici123

    Problem:
    Buddypress user can create a group which have the same name of an existing group. In this way, there are two group whith the same name. How to solve it?

    BuddyPress version 2.1.1 installed.

Viewing 3 replies - 1 through 3 (of 3 total)
  • It creates as in the group name, if you look at the slug or machine name, the url you should see it as *-1234 which I presume is the id appended, this behaviour is similar to that which would happen in WP if you created two pages with the same name, your not prevented from doing so but WP needs to be able to reference them so will append ‘-2’ to keep them distinct.

    This maybe is not the best idea for Groups though, perhaps you would like to open a ticket to suggest behaviour is changed?


    vidivici123
    Participant

    @vidivici123

    Thanks for your reply, Hogo.

    Yes, i found the *-1234 after the name in the url. Problem is I have thousands groups, when a user want to create a new group, not all of them will search in the group list to see if there is already a same-named group. In this way, there are a lot of twin group and i have to delete it (which will make user feel not good).

    Is there any code to appear ‘this group name has already be used’ when the user create a same group? Thx!

    There is no code I’m aware of, you would need to write a custom function that hooked in to the group creation hook and ran a check on existing names compared to proposed name and bailed out with an error message if a match found.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Buddypress user can create a group which already existed’ is closed to new replies.
Skip to toolbar