Last modified: 2011-09-13 03:35:13 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 T32874, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 30874 - JS wikitext parser is fragile
JS wikitext parser is fragile
Status: RESOLVED DUPLICATE of bug 30707
Product: MediaWiki extensions
Classification: Unclassified
UploadWizard (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-09-12 18:01 UTC by Ian Baker
Modified: 2011-09-13 03:35 UTC (History)
3 users (show)

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


Attachments

Description Ian Baker 2011-09-12 18:01:06 UTC
As outlined in bug 30665, there is some wikitext that the JS parser won't accept.

That's fine, but currently when it fails it breaks the page.  That's probably bad, since the current expectation is that broken wikitext simply won't render.  This caused Arabic UploadWizard to fail entirely because of a typo in the translation (and probably a few other languages as well, but I didn't test).

I bet there's something that could be wrapped in a try/catch, and this would be fixed.  It would even be fine if it failed to return the message entirely, but without halting JS execution.
Comment 1 Brion Vibber 2011-09-12 18:04:53 UTC
What sort of breakage is happening, at what level? If it's a parse error in the PEG.js-generated parser, then there's not much more you can 'catch' than the entire 'yes it parses' / 'no it doesn't'.
Comment 2 Siebrand Mazeland 2011-09-12 18:06:47 UTC
Put in for example "{{SIETNAME}}" and it breaks.
Comment 3 Ian Baker 2011-09-12 18:20:42 UTC
Or, something like [ $1 is a foo] (note leading space).  This doesn't render to anything in the php parser, fyi.

It'd be fine to catch it at the level of "nope, doesn't parse."  It could even throw an an informative error at the console, like "message [messagename] failed to parse".  The trouble is when the entire page breaks, and it takes some time to even discover that it's a problem with i18n.

If a single message is broken, I bet most users will still be able to figure out what to do.
Comment 4 Neil Kandalgaonkar 2011-09-13 03:35:13 UTC

*** This bug has been marked as a duplicate of bug 30707 ***

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


Navigation
Links