On https://www.mediawiki.org/wiki/Extension:WikiEditor the text "The button for adding user signatures (four tildes) is available on talk pages and in namespaces specified in $wgExtraSignatureNamespaces." appears to be wrong.
Description
Event Timeline
$wgExtraSignatureNamespace is not used anymore for the WikiEditor extension, as far as I see.
@Wikinaut: Ah, thanks. Please don't expect original authors of some code to plan to work on every single issue that might happen around that code base nowadays. Also see https://www.mediawiki.org/wiki/How_to_report_a_bug - thanks! :)
WikiEditor doesn't use $wgExtraSignatureNamespaces directly, but it calls mw.Title.wantSignaturesNamespace() to decide whether to display the button, and that uses $wgExtraSignatureNamespaces.
https://phabricator.wikimedia.org/diffusion/EWED/browse/master/modules/jquery.wikiEditor.toolbar.config.js$622
https://phabricator.wikimedia.org/source/mediawiki/browse/master/resources/src/mediawiki.Title/Title.js$649
As far as I can see, the feature works correctly.
I had to deactivate the delete command in order to get that mechanism working for NS_MAIN - which I added in LocalSettings.php. I will try that again and report here whether it worked or not in the second trial.
It's not correctly working:
We have in LocalSettings:
define( "NS_PROJECTS", 500 );
define( "NS_PROJECTS_TALK", 501 );
define( "NS_SESSION", 502 );
define( "NS_SESSION_TALK", 503 );
define( "NS_ASSEMBLY", 504 );
define( "NS_ASSEMBLY_TALK", 505 );
...
$wgExtraSignatureNamespaces = [ NS_MAIN, NS_HELP, NS_STATIC, NS_PROJECTS, NS_SESSION, NS_ASSEMBLY ];
The additional Namesspaces NS_HELP, NS_STATIC, NS_PROJECTS, NS_SESSION, NS_ASSEMBLY are ignored.
It appears to be an issue of the correct syntax.
I changed to
$wgExtraSignatureNamespaces = array( NS_MAIN, NS_HELP, NS_STATIC, NS_PROJECTS, NS_SESSION, NS_ASSEMBLY );
which works now.
I will change the description page
https://www.mediawiki.org/wiki/Manual:$wgExtraSignatureNamespaces
accordingly.
@Aklapper: Additional question: is there a simple way or trick to programmatically add all namesspaces?
$wgExtraSignatureNamespaces = array( "all namespaces" );
@Wikinaut: Not sure why you're asking me specifically. :) For "How to...?" questions, please ask on the MediaWiki Support Desk or ask on a dedicated project/extension talk page if existing. Thanks for your understanding!
@Wikinaut Glad you got it working. However, I must note that array( … ) and [ … ] are exactly the same. If changing one to the other fixed your problem, then I would guess that your configuration was correct from the start, but the script was cached in your browser and that's why you didn't see the effect immediately.
@matmarex Hi, even why I must admit, that I knew this both. the extension was not working for non-NS_MAIN namespaces.
I suggest that I will scrutizine the problem (or non-problem) again and report here.
So I think it could be an issue related to the specific php version we have or with the fact that some namespaces we use were defined as constants in the LocalSettings.