Page MenuHomePhabricator

[Regression pre-wmf.8] Opening the wikitext editor fails
Closed, ResolvedPublic1 Estimated Story Points

Description

Clicking the pencil icon or navigating directly to #/editor/0 opens the wikitext editor, which then immediately closes, e.g. http://en.m.wikipedia.beta.wmflabs.org/wiki/Claude_Monet#/editor/0.

The Chrome DevTools Console shows the following error:

Error: Property "onUpdateState" is not a function Error: Property "onUpdateState" is not a function
    at validateMethod (eval at <anonymous> (http://en.m.wikipedia.beta.wmflabs.org/w/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=minerva&version=eHtnlG51:4:681), <anonymous>:8:245)
    at OoUiToolbar.oo.EventEmitter.on (eval at <anonymous> (http://en.m.wikipedia.beta.wmflabs.org/w/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=minerva&version=eHtnlG51:4:681), <anonymous>:8:487)
    at OoUiToolbar.oo.EventEmitter.connect (eval at <anonymous> (http://en.m.wikipedia.beta.wmflabs.org/w/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=minerva&version=eHtnlG51:4:681), <anonymous>:10:135)
    at EditVeTool.OoUiTool (http://en.m.wikipedia.beta.wmflabs.org/w/load.php?debug=false&lang=en&modules=oojs-ui&skin=minerva&version=d8515bc6cc9d:82:118)
    at new EditVeTool (eval at <anonymous> (http://en.m.wikipedia.beta.wmflabs.org/w/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=minerva&version=eHtnlG51:4:681), <anonymous>:6:2034)
    at OoUiToolFactory.oo.Factory.create (eval at <anonymous> (http://en.m.wikipedia.beta.wmflabs.org/w/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=minerva&version=eHtnlG51:4:681), <anonymous>:17:36)
    at OoUiListToolGroup.OO.ui.ToolGroup.populate (http://en.m.wikipedia.beta.wmflabs.org/w/load.php?debug=false&lang=en&modules=oojs-ui&skin=minerva&version=d8515bc6cc9d:91:605)
    at OoUiListToolGroup.OO.ui.ListToolGroup.populate (http://en.m.wikipedia.beta.wmflabs.org/w/load.php?debug=false&lang=en&modules=oojs-ui&skin=minerva&version=d8515bc6cc9d:134:157)
    at OoUiListToolGroup.OoUiToolGroup (http://en.m.wikipedia.beta.wmflabs.org/w/load.php?debug=false&lang=en&modules=oojs-ui&skin=minerva&version=d8515bc6cc9d:88:750)
    at OoUiListToolGroup.OoUiPopupToolGroup (http://en.m.wikipedia.beta.wmflabs.org/w/load.php?debug=false&lang=en&modules=oojs-ui&skin=minerva&version=d8515bc6cc9d:129:767)

This was picked up in linux-firefox-sauce#885.

Event Timeline

phuedx raised the priority of this task from to Unbreak Now!.
phuedx updated the task description. (Show Details)
phuedx added a project: MobileFrontend.
phuedx added subscribers: phuedx, Jdforrester-WMF.

EditVeTool in MobileFrontend indeed has no onUpdateState method. Probably caused by 5be12b4ae48bc9590f425ec2addd64226b2658ce in OOjs UI.

Change 254388 had a related patch set uploaded (by Bartosz Dziewoński):
Add missing #onUpdateState method to OO.ui.Tool subclasses

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

I don't have MF set up locally, and debug mode on Beta seems completely broken (as usual), so I didn't really test that patch. Please verify it.

Florian assigned this task to matmarex.
Florian subscribed.

Change 254388 merged by jenkins-bot:
Add missing #onUpdateState method to OO.ui.Tool subclasses

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

Jdforrester-WMF renamed this task from [Regression] Opening the wikitext editor fails to [Regression pre-wmf.8] Opening the wikitext editor fails.Nov 20 2015, 5:36 PM
Jdforrester-WMF edited projects, added VisualEditor; removed Patch-For-Review.

Just tested this locally and it LGTM. Thanks @matmarex!

This bug concerned me. Did this issue hit production or did we squash it before that happened?

How can we avoid these issues happening again in future?
@Jdforrester-WMF @Esanders we have browser tests covering this sending to qa alerts for MobileFrontend - would it help to setup a job specifically for the editing browser tests? Is there a qunit test we could add to protect against this sort of thing in future? Thoughts welcomed.

This bug concerned me. Did this issue hit production or did we squash it before that happened?

"[Regression pre-wmf.8]" means it was a regression in master that was not present in wmf.7 and was fixed before wmf.8 was released (which will be next week).

How can we avoid these issues happening again in future?
@Jdforrester-WMF @Esanders we have browser tests covering this sending to qa alerts for MobileFrontend - would it help to setup a job specifically for the editing browser tests? Is there a qunit test we could add to protect against this sort of thing in future? Thoughts welcomed.

A qunit test in… what? This was an existing flaw in local code that was exposed when an upstream library made a minor internal code change.