new doc: "select a valid choice"

RESOLVED FIXED

Status

P2
normal
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: groovecoder, Unassigned)

Tracking

Details

(Whiteboard: [specification][type:bug][triaged])

(Reporter)

Description

5 years ago
What did you do?
================
1. go to /en-US/docs/new
2. Title: "new doc"
3. Slug: "new_doc"
4. Content: "new doc"


What happened?
==============
validation message:

"Select a valid choice. That choice is not one of the available choices." 

What should have happened?
==========================
Save the new article with no error message.

Is there anything else we should know?
======================================
I think this is caused by missing the "Needs review" checkboxes?
(Reporter)

Updated

5 years ago
Priority: -- → P2

Comment 1

5 years ago
Hi Luke, I was working on this template so I've taken a look...

I've found that the error is in:
/kuma/apps/wiki/templates/wiki/new_document.html - line 38 : <input type="hidden" name="parent_topic" value="{{ parent_id | safe }}" />
{{ parent_id | safe }} is returning the string "None" (I think it must be empty).
Maybe a condition for parent_id != None can solve the problem?

If this is not valid (and from here I'm improvising :P)
This "parent_id", is defined in /kuma/apps/wiki/views.py - line 905  and then line 828, when the "None" becomes a string... I don't know how to solve it from here, or if I'm right...

Hope this helps
Component: General → Editing
Whiteboard: [specification][type:bug] → [specification][type:bug][triaged]
Duplicate of this bug: 859451

Comment 3

5 years ago
Commits pushed to master at https://github.com/mozilla/kuma

https://github.com/mozilla/kuma/commit/3b5ee23bcddebecfe55a8361b264b27df9e21ad1
fix bug 979807, 878921, 953349 - Prevent first doc save error message

https://github.com/mozilla/kuma/commit/b64281dedecf2a93413f64349481c0347cd1339c
Merge pull request #2193 from darkwing/fix-valid-choice-878921

fix bug 979807, 878921, 953349 - Prevent first doc save error message

Updated

5 years ago
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
(Reporter)

Updated

5 years ago
Duplicate of this bug: 953349
You need to log in before you can comment on or make changes to this bug.