Page MenuHomePhabricator

Edit preview doesn't work for JS and CSS pages (throws JS error)
Closed, ResolvedPublic

Description

If you use the Wikitext editor to edit a JS or CSS page on mobile, it throws the following Javascript error: "resp.parse.sections[0] is undefined"

Apparently our previewing code assumes that the API always returns sections for pages (which JS and CSS pages don't have).


Version: unspecified
Severity: major
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=72522

Details

Reference
bz72521

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:50 AM
bzimport set Reference to bz72521.
bzimport added a subscriber: Unknown Object (MLST).

bingle-admin wrote:

Prioritization and scheduling of this bug is tracked on Trello card https://trello.com/c/sudMqbUn

Apparently this may be affecting regular pages as well.

Looks like there could be 2 separate bugs, as the preview on regular pages isn't throwing a JS error.

gerritadmin wrote:

Change 168823 had a related patch set uploaded by Florianschmidtwelzow:
EditorApi: Check for sections

https://gerrit.wikimedia.org/r/168823

gerritadmin wrote:

Change 168823 merged by jenkins-bot:
EditorApi: Check for sections

https://gerrit.wikimedia.org/r/168823