error "is not a valid api" trying to add subscriber to a bug

Bug #388783 reported by Martin Pool
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Deryck Hodge

Bug Description

I'm trying to add a subscriber (the canonical mysql support team) to a bug, and after submitting the "subscribe someone else" form I get a red ajax error message, stating something like "~canonical-mysql-support is not a valid api". Unfortunately the error dialog disappeared spontaneously while I was trying to open this bug (which seems like another bug.)

Was on https://bugs.edge.launchpad.net/bzr/+bug/65286

Tags: lp-bugs
Revision history for this message
Martin Pool (mbp) wrote :

It's reproducible.

Is it connected to this team somehow having a space in its name? How can that happen?

Revision history for this message
Martin Pool (mbp) wrote :

The team is here: <https://bugs.edge.launchpad.net/~mysql+canonical-support-bazaar> and does apparently indeed have a space escaped to plus.

Revision history for this message
Martin Pool (mbp) wrote :

If there's a workaround it would be helpful.

Revision history for this message
Deryck Hodge (deryck) wrote :

Can you middle click or right click and open a new tab or some other such alternate click pattern to get to the actual subscribe someone else page? Does that page work?

This is related to bug 382018 and likely a fix for one will get the other. In both cases, characters not normally used in URIs are used in usernames. I would have thought we would have prevented spaces, plus signs, etc. since usernames are used in URLs, but I should have checked to confirm rather than assuming.

Changed in malone:
assignee: nobody → Deryck Hodge (deryck)
importance: Undecided → High
milestone: none → 2.2.6
status: New → Triaged
Revision history for this message
Martin Pool (mbp) wrote :

Yes, right-clicking then choosing 'open in new window' did give me the non-ajax form from which I could add them.

I didn't try subscribing them from email but that might also have worked. Or it might not, depending on how the email syntax handles spaces.

Perhaps if spaces are not intended to be supported but people have created them those teams should be migrated?

I suspect what may have happened is this: the web ui forbids spaces in names. However it also forbids names containing the word "canonical". If someone asked a LOSA to create that team by hand, they may have bypassed the checks.

Deryck Hodge (deryck)
Changed in malone:
milestone: 2.2.6 → 2.2.7
Revision history for this message
Deryck Hodge (deryck) wrote :

The API problem mentioned here is fixed as of devel r8845. There are some issues that remain when updating the DOM after subscribing directly or subscribing a team you can unsubscribe, which relates to bug 382018. I've got a branch in the works to fix the remaining problems and have also opened bug 399348 against lp-registry, since we shouldn't be using + in user names anyway.

Changed in malone:
status: Triaged → Fix Committed
Deryck Hodge (deryck)
Changed in malone:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.