Search code examples
mediawikivisual-editormediawiki-visualeditor

Mediawiki visualeditor is on some pages available and others not


I use MediaWiki 1.41 and have VisualEditor installed, which is visible in the special pages -> Version.

Some pages are editable with VisualEditor. It shows (Translated from Dutch) 'Edit' and 'Edit sourcecode'. This is good.

But some pages only shows ''Edit sourcecode', the reason why is unknown to me. I like all pages have both options.

I have search in https://www.mediawiki.org/wiki/Extension:VisualEditor and search in StackOverflow, including the 6 related questions, connected to this question, but could not find a solution.

In LocalSettings.php I have configured:

> wfLoadExtension( 'VisualEditor' );    
> $wgDefaultUserOptions['VisualEditor-enable'] = 1;

What can be wrong, and how can this be solved?

Alexander Mashin gave the right solutions, it is the namespace.

See: https://www.mediawiki.org/wiki/Extension:VisualEditor#Changing_active_namespaces Code example:

$wgVisualEditorAvailableNamespaces = [
    'Project' => true,
    'File' => false,
    'Extra' => true
];

Solution

  • Make sure than $wgVisualEditorAvailableNamespaces has true keys for all namespaces in which Visual Editor is to be enabled.