Page MenuHomePhabricator

EditPage.php assumes mediawiki.action.edit module present (breaks mobile)
Closed, DeclinedPublic

Description

In mobile this module is NOT present so this throws a javascript exception.

Currently a dependency is made in EditPage.php itself to add toolbar related code. This should be added as a separate module rather than an inline script.

$script = 'mw.loader.using("mediawiki.action.edit", function() {';

getEditToolbar should not run any javascript - it should simply add html that is enhanced by a javascript module. An inline script does not seem to be necessary here.


Version: 1.21.x
Severity: normal

Details

Reference
bz44915

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 1:21 AM
bzimport set Reference to bz44915.
bzimport added a subscriber: Unknown Object (MLST).

This horrible hack has got the functionality working in mobile for the time being:
https://gerrit.wikimedia.org/r/#/c/48663/2/includes/skins/SkinMobile.php

Will this be fixed once the code is moved out of core? (bug 28856)

Mobile now completely overrides the edit action so this is no longer an issue here.