Closed Bug 947271 Opened 11 years ago Closed 11 years ago

Curated group names can break group URLs

Categories

(Participation Infrastructure :: Phonebook, defect)

2014-02.1
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: dpoirier, Assigned: dpoirier)

References

Details

(Whiteboard: [kb=1208141] [qa-])

On the curatedgroups feature branch, we're no longer creating groups through the groups field on the profile edit page, which was restricting group names to  a pretty minimal character set. On the new group creation form, we're currently allowing most chars in a group name. 

Some of the resulting slugs (the 'url' field on the group), when used to form URLs for the group app, result in complete URLs that don't match the patterns in the group app URL conf. 

For example, you can include ' in a group name (e.g. "Dan's Super Group") and the slug is something like "dan's_super_group", but ' is not matched by the patterns, so when you try to view the group, you get a 404.

We could add validation to the group form to restrict the group names back to what we had before, but that seems overly limiting. I think a better solution would be to allow pretty arbitrary group names, and just improve the code we use to generate the slug (url) so the slugs have the limited character set that'll match our URL patterns.
> I think a better
> solution would be to allow pretty arbitrary group names, and just improve
> the code we use to generate the slug (url) so the slugs have the limited
> character set that'll match our URL patterns.

+1 to this. Thanks!
Pull request https://github.com/mozilla/mozillians/pull/741
Status: NEW → ASSIGNED
QA Contact: dpoirier
Assignee: nobody → dpoirier
QA Contact: dpoirier
Whiteboard: [kb=1208141]
Version: other → next
Marking verified as [qa-]. I suspect the unit tests coverage is sufficient. If there are manual test cases that I'm missing please unresolve the bug and I'll pounce on it.
Status: RESOLVED → VERIFIED
Whiteboard: [kb=1208141] → [kb=1208141] [qa-]
Version: next → 2014-02.1
You need to log in before you can comment on or make changes to this bug.