Page MenuHomePhabricator

Remove javascript config setting wgVariantArticlePath
Open, Needs TriagePublic

Description

The value of $wgVariantArticlePath is added to mw.config on all requests, but the only place it is used in JavaScript appears to be within the VisualEditor extension, specifically in ve.ui.MWAdvancedSettingsPage.js which is part of the ext.visualEditor.mwmeta ResourceLoader module. Instead of always including it, it should be added only by VisualEditor when needed, ideally via packageFiles, but since that module isn't using packageFiles yet, it can be done via a new entry in the wgVisualEditorConfig value added to mw.config. Thats not ideal (T291729) since it would still be added on all requests when VE is installed, but it would help for requests on wikis where VisualEditor is not installed.

This was originally added in rMW792e155bd22a: * Put both hidden categories and normal categories into the view page HTML, but… by @tstarling, saying

Add wgVariantArticlePath and wgActionPaths to the JS variables script, needed to determine title from link href.

but that patch didn't appear to add any uses of the config in the JavaScript.