Closed
Bug 907949
Opened 11 years ago
Closed 11 years ago
Collection creation fails with 'slug [ "This field is required." ]'
Categories
(Marketplace Graveyard :: Admin Tools, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
2013-08-27
People
(Reporter: krupa.mozbugs, Unassigned)
References
()
Details
(Whiteboard: [See comment 1])
steps to reproduce:
1. Load https://marketplace-dev.allizom.org/curation/new_collection?type=basic
2. Try to make a collection with the name アドオンを探す or Más
expected behavior:
We allow collections with localized strings in their names to be created
observed behavior:
Collection creation fails with a 400
[15:00:56.076] POST https://marketplace-dev.allizom.org/api/v1/rocketfuel/collections/?_user=&lang=en-US®ion=worldwide [HTTP/1.1 400 BAD REQUEST 137ms]
Updated•11 years ago
|
Blocks: mkt-publishtool-api
Reporter | ||
Comment 1•11 years ago
|
||
So, this is happening with all collections. Nothing to do with unicode. Updated the bug summary.
No longer blocks: mkt-publishtool-api
Summary: Unable to create collections which have unicode in their names → Collection creation fails with 'slug [ "This field is required." ]'
Whiteboard: [See comment 1]
Comment 2•11 years ago
|
||
We need to add a "Slug" field that gets slugified onkeypress from the "Name" field.
We should also disable the "Create" button if the form is incomplete/invalid.
Comment 3•11 years ago
|
||
@cvan: Any reason not to to autogenerate a slug if one isn't provided?
Comment 4•11 years ago
|
||
PR for the potential approach suggested in comment 3: https://github.com/mozilla/zamboni/pull/1032
Status: NEW → ASSIGNED
Target Milestone: --- → 2013-08-27
Comment 5•11 years ago
|
||
I'll push my updates tomorrow that add a slug field to the New Collection page. That will fix this error. I'd rather have an autogenerated slug that the client has seen than one that turns out to be a surprise. Let me know if you disagree.
Either way, the PR you have looks good and there's no reason we can't have both.
Comment 6•11 years ago
|
||
Landed that PR here: https://github.com/mozilla/zamboni/compare/5761699e2b95...fd29c960b5e5
@basta: resolve this bug when your updates land?
Comment 7•11 years ago
|
||
Will do. I'm in the process of updating our forms code for new styles as well as better validation support (turning the control borders red on error) and `add -p`-ing the slug stuff might be tricky. I should have it ready by EOD.
Comment 8•11 years ago
|
||
Should be landed.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•