Page MenuHomePhabricator

VisualEditor loads in the wrong namespaces
Closed, ResolvedPublic1 Estimated Story Points

Description

Trying to edit a couple of talk pages, and VisualEditor loads instead of the wikitext editor. This gets even more annoying when I try to edit a section (and VE loads) and then I switch back to the wikitext editor (which shows me the entire page rather than editing that section)

Examples seem to be everywhere, but I found it on my user page specifically. This loads VisualEditor for me: https://www.mediawiki.org/wiki/User_talk:Mooeypoo?action=edit

Event Timeline

@neil_p._quinn_WMF just reported what turns out to be the same issue:
https://gerrit.wikimedia.org/r/#/c/292165/2/ApiVisualEditor.php
Seems to be that array_merge with the (empty array result of) ExtensionRegistry::getInstance()->getAttribute( 'VisualEditorAvailableNamespaces' ):

hphpd> $config = ConfigFactory::getDefaultInstance()->makeConfig( 'visualeditor' );
$config = ConfigFactory::getDefaultInstance()->makeConfig( 'visualeditor' );
hphpd> $extr = ExtensionRegistry::getInstance()->getAttribute( 'VisualEditorAvailableNamespaces' );
$extr = ExtensionRegistry::getInstance()->getAttribute( 'VisualEditorAvailableNamespaces' );
hphpd> $cfgv = $config->get( 'VisualEditorAvailableNamespaces' );
$cfgv = $config->get( 'VisualEditorAvailableNamespaces' );
hphpd> $res = array_merge( $extr, $cfgv );
$res = array_merge( $extr, $cfgv );
hphpd> =$extr
=$extr
Array
(
)

hphpd> =$cfgv
=$cfgv
Array
(
    [4] => true
    [200] => true
    [202] => true
    [204] => true
    [206] => true
    [208] => true
    [2] => true
    [6] => true
    [12] => true
    [14] => true
    [User] => true
    [File] => true
    [Category] => true
    [0] => true
)

hphpd> =$res
=$res
Array
(
    [0] => true
    [1] => true
    [2] => true
    [3] => true
    [4] => true
    [5] => true
    [6] => true
    [7] => true
    [8] => true
    [9] => true
    [User] => true
    [File] => true
    [Category] => true
    [10] => true
)
AlexMonk-WMF renamed this task from VisualEditor loads on editing talk pages in mw.org to VisualEditor loads in the wrong namespaces.Jun 29 2016, 8:39 PM

Change 296652 had a related patch set uploaded (by Alex Monk):
Remove consideration of extension registry configured namespaces until we can find the correct way to merge them

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

Change 296653 had a related patch set uploaded (by Alex Monk):
Remove consideration of extension registry configured namespaces until we can find the correct way to merge them

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

Jdforrester-WMF triaged this task as Unbreak Now! priority.Jun 29 2016, 9:01 PM
Jdforrester-WMF set the point value for this task to 1.

Change 296652 merged by jenkins-bot:
Remove consideration of extension registry configured namespaces until we can find the correct way to merge them

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

Change 296653 merged by jenkins-bot:
Remove consideration of extension registry configured namespaces until we can find the correct way to merge them

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

Change 296655 had a related patch set uploaded (by DLynch):
Don't use array_merge for namespace configs

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

Change 296659 had a related patch set uploaded (by Alex Monk):
Don't use array_merge for namespace configs

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

Change 296655 merged by jenkins-bot:
Don't use array_merge for namespace configs

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

Change 296659 merged by jenkins-bot:
Don't use array_merge for namespace configs

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

Thanks to everyone involved in finding and fixing this, especially @Mooeypoo, @Neil_P._Quinn_WMF and @DLynch. It looks correct in production now