Last modified: 2014-02-26 12:53:17 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T44564, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 42564 - EventLogging extension doesn't indicate which lines contain invalid JSON
EventLogging extension doesn't indicate which lines contain invalid JSON
Status: NEW
Product: Analytics
Classification: Unclassified
EventLogging (Other open bugs)
unspecified
All All
: Low normal
: ---
Assigned To: Nobody - You can work on this!
: easy
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-30 03:08 UTC by MZMcBride
Modified: 2014-02-26 12:53 UTC (History)
7 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description MZMcBride 2012-11-30 03:08:08 UTC
When you try to save invalid JSON into a page in the Schema namespace on Meta-Wiki (e.g., <https://meta.wikimedia.org/wiki/Schema:Sandbox>), an error message appears:

---
Invalid JSON. The content of this page must be valid JSON. Please check your syntax.
---

This error message does not currently include on which line(s) there's an alleged error, though. It'd be nice if it listed the lines containing errors or highlighted the offending lines in red or both or something. Maybe activating the CodeEditor extension on this namespace (bug 42561) would help mitigate the issue of invalid JSON being submitted, but a more direct error message from this extension would be nice.
Comment 1 MZMcBride 2012-11-30 03:08:58 UTC
I'm gonna go ahead and mark this bug as easy. If that's inaccurate, feel free to remove the keyword.
Comment 2 Ori Livneh 2012-11-30 04:28:15 UTC
Linebreaks in JSON aren't significant, and the content model treats them as presentational artifacts (for example, by coercing all edits into a consistent format). So associating an error with a particular line isn't quite right. It might be easiest to simply indicate the specific character on which parsing finally choked, including the line it appeared on. This probably involves modifying the FormatJson class in core, but you're right -- I don't think it'll be a difficult change to make.
Comment 3 Andre Klapper 2014-02-26 12:53:17 UTC
[moving from MediaWiki extensions to Analytics product - see bug 61946]

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links