Page MenuHomePhabricator

Don't try to load VisualEditor in namespaces where it isn't supported
Closed, ResolvedPublic

Description

Right now, if you switch to alpha mode and click the edit button on a page like...
https://en.m.wikipedia.org/wiki/User_talk:Kaldari
...you get an error since VisualEditor is disabled for that namespace on en.wiki.

To fix this, we need to surface the config settings in wmgVisualEditorNamespaces on the client-side and use it in the editor loading process in editor.js.


Version: unspecified
Severity: normal

Details

Reference
bz64681

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:20 AM
bzimport set Reference to bz64681.
bzimport added a subscriber: Unknown Object (MLST).
kaldari created this task.Apr 30 2014, 9:12 PM

bingle-admin wrote:

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

Looks like the information is already available on the client-side:
mw.config.get( 'wgVisualEditorConfig' ).namespaces

Change 130794 had a related patch set uploaded by Kaldari:
Make sure mobile VisualEditor is only loaded when appropriate

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

Change 130794 merged by jenkins-bot:
Make sure mobile VisualEditor is only loaded when appropriate

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

Change 132124 had a related patch set uploaded by Kaldari:
Only create editor switcher from wikitext editor if VE is usable

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

Change 132124 merged by jenkins-bot:
Only create editor switcher from wikitext editor if VE is usable

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