Closed Bug 763827 Opened 12 years ago Closed 12 years ago

Kumascript needs a query string param to disable create-page-on-404

Categories

(developer.mozilla.org Graveyard :: Editing, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: lorchard, Assigned: davidwalsh)

References

Details

(Whiteboard: t=2012-06-26)

Kumascript relies on real 404's to detect whether a template is missing, and then to report an error for each missing template.

Currently, the new create-page-on-404 feature (bug 760240) breaks this. When Kumascript attempts to load a non-existent page, it includes the HTML source to the login page... because it's trying to follow a redirect to the new-page URL without being logged it.

A suggested solution: Support a query string that disables the create-page-on-404 feature, say ?nocreate=1
This also affects content includes on pages. If the included page is 404, the content included is also the login page

So, also along with ?nocreate, we should disable create-on-404 if there is a ?raw or ?include parameter.
I broke it, I'll fix it. :D
Assignee: nobody → dwalsh
My branch here includes a check for the "raw", "include", and "nocreate" keys;  if present, the 404-and-create does not execute:

https://github.com/darkwing/kuma/tree/kumascript-disable-create-404-763827

This branch also features a fix for this bug:

https://bugzilla.mozilla.org/show_bug.cgi?id=764106

Adding record of branch here as I cannot duplicate the problem, even on master branch.
Commits pushed to master at https://github.com/mozilla/kuma

https://github.com/mozilla/kuma/commit/1d9161f34b3b11ea886ef0497e2837b4051f506f
fix bug 763827 - Preventing create on 404 if certain parameters specified

  -  Also includes a test and tweaks for create-on-404 by lmorchard

https://github.com/mozilla/kuma/commit/4702ada8333853bdfc169a8ee44d9fb2f4b4cffe
Merge pull request #270 from darkwing/kumascript-disable-create-404-763827

fix bug 763827 - Preventing create on 404 if certain parameters specified
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Whiteboard: t=2012-06-26
Version: Kuma → unspecified
Component: Docs Platform → Editing
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.