Closed Bug 1044093 Opened 6 years ago Closed 5 years ago

Collapse scary error messages


( :: Wiki pages, defect, minor)

Not set


(Not tracked)



(Reporter: shobson, Assigned: davidwalsh)



(Whiteboard: [specification][type:change])


(2 files)

What feature should be changed? Please provide the URL of the feature if possible.
Rather than providing highly technical error messages can we provide a friendlier message with the option to view the more technical content.

What problems would this solve?
Kumascript errors on pages can be scarey for new contributors and may be causing us to losing new contributors.

Who would use this?

What would users see?
To be determined, the Ubuntu error messages were suggested as a starting point.

What would users do? What would happen as a result?
Users would see a smaller, friendlier message when they see error messages and hopefully not be scared off.

Is there anything else we should know?
Severity: normal → minor
Component: General → Wiki pages
Assignee: nobody → kechang
Closed: 5 years ago
Resolution: --- → FIXED
I think :RyanVM commented on the wrong bug. Going to contact him to make sure this finds its correct home.
Resolution: FIXED → ---
Assignee: kechang → shobson
Thanks for the note - someone committed with the wrong bug number and our automated bug marking tool went astray as a result.
For anybody who stumbles upon this bug from the the commit in comment 1, the correct bug number was bug 1044963.
Hi All,

I am really sorry that I put the wrong bug number in the patch.
Please accept my apology for the inconvenience it has caused you.
I will be more careful next time.

Best regards,
:kershaw No worries, it happens sometimes :) Everything ended up in the right place.
Attached image error.jpg
Passing this off to :jezdez for back-end implementation and maybe a little re-factoring. 

When I looked a the KumaScript and django code I was confused about what parts of the formatting each languages was handling, both include conditional formatting based on the type of error and there is some of duplication of code right now. But maybe it makes sense to people who know the languages better.

There are a couple JavaScript functions in a different PR I want to take advantage of, so the JavaScript to hide/show the error is not in place. That means I don't want to submit the PR to master yet. 

:jezdez My work is in a PR here: I have tried to indicate the work that needs to be done using HTML comments and I have include an attachment on this bug to give you an idea of what we are aiming for when it's all finished.
Flags: needinfo?(jezdez)
The `kumascript_errors` python context variable is provided by the request to KumaScript. [1] The KumaScript errors module [2] has some code to extract:

Error type
Macro (for corresponding Edit link)
Full text

into addressable items in the `kumascript_errors` dictionary. But, it doesn't pass the line and column of the error to python - only KumaScript knows about them.

So, it's easier to implement the message if we drop the line & column display from it. (Note: the "stacktrace" message will still display line numbers and the code context of errors.)

:fscholz - is that enough context for the error messages?

Flags: needinfo?(jezdez) → needinfo?(fscholz)
FWIW, I'm using as my local test page for this work.

If anyone needs them, I'm attaching the latest "built-in" template modules for KumaScript. You can load them into your local dev box via
I am not able to test this locally right now and I don't have the time to fix my setup.
Can you attach an updated screenshot of how error messages would look like? The one Stephanie posted looks good to me.
Flags: needinfo?(fscholz)
:groovecoder I really like the line numbers and don't find the offset information useful but don't let this hold up the work if it's complicated. Just remove line/column and do not add back offset if it will get this done faster :)
Commits pushed to master at
Fix Bug 1044093 - Friendlier Error Messages

Initial HTML for new errors, needs to be wired up to the backend.
bug 1044093 - fix ngettext pluralization code
bug 1044093 - Display known information about kumascript errors, add toggle button

Complete kumascript error toggling

Fix test failures
Merge pull request #2688 from groovecoder/ks-error-messages-1044093

fix bug 1044093 - friendlier kumascript errors
Closed: 5 years ago5 years ago
Resolution: --- → FIXED
I think we're getting some errors from this change?
Resolution: FIXED → ---
Assignee: shobson → dwalsh
Odd, looking now
Duplicate of this bug: 1057366
Fixed related bug:

Horrible copy/paste product within CKEditor.
Commits pushed to master at
Fix bug 1044093 - Provide safe macro display in kumascript error messages
Merge pull request #2702 from darkwing/1044093-error-messages

Fix bug 1044093 - Provide safe macro display in kumascript error messages
Closed: 5 years ago5 years ago
Resolution: --- → FIXED
Duplicate of this bug: 1057456
You need to log in before you can comment on or make changes to this bug.