Skip to:
Content

BuddyPress.org

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#5806 closed defect (bug) (fixed)

Issue adding members to team who have a whitespace in their names

Reported by: petereussen's profile peter.eussen Owned by:
Milestone: Priority: low
Severity: minor Version: 2.0
Component: Groups Keywords: has-patch
Cc:

Description

Recently i encountered a problem with the "add new members" functionality in the admin section. When i tried adding a member who had a space (and dot) in their name, it refused to add them.

The problem arises because the javascript in question (buddypress/bp-groups/admin/js/admin.js) tries to create a remove element where the ID of the element is based on the name.

To reproduce it:

  • create a user who has a dot in his name say (Peter v. Eussen)
  • Try to add the user to a team

You should see it show up in the list of users to add, but not in the list of added users after you update the group.

Solution would be simple:

In bp-groups/admin/js/admin.js replace line 3 with the following line:

var remove_id = 'bp-groups-remove-new-member-' + ui.item.value.replace(/[,:\.\s\-]/g,'-');

Maybe more characters need to be added to ensure that the value complies to valid HTML ID characters.

I wonder though.. why is the displayed name used in the new_members[] array, instead of say the "login name", which would seem more unique..

Change History (3)

#1 follow-up: @DJPaul
10 years ago

I think this has been addressed by r8417 (#5633) but we should check.

#2 in reply to: ↑ 1 @imath
10 years ago

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

Replying to DJPaul:

I think this has been addressed by r8417 (#5633) but we should check.

You're right DJPaul, just checked with "Peter v. Eussen" and it works fine for me.

Thanks peter.eussen for your feedback, you can check in 2.1 beta1 it's fixed.

Closing this ticket, feel free to reopen if something is still going wrong for you.

#3 @DJPaul
10 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.