This is because in Setup.php, $wgExtraNamespaces is added into the list of
canonical namespaces *before* the extension functions are called. If you
really need to have setup occur using $wgExtensionFunctions, you need to
add your extra namespaces to $wgCanonicalNamespaces as well as
$wgExtraNamespaces.

*--*
*Tyler Romeo*
Stevens Institute of Technology, Class of 2015
Major in Computer Science
www.whizkidztech.com | tylerro...@gmail.com


On Tue, Jan 29, 2013 at 12:58 PM, Matthew Walker <mwal...@wikimedia.org>wrote:

> Morning All,
>
> Need some help / a duck [1].
>
> Fundraising pushed some patches yesterday which introduced two new
> namespaces; CNBanner and CNBanner_talk. Ideally these would only be present
> on 'infrastructure' wikis that actually host banner content (so meta, test,
> betameta) however I've been unable to figure out how to do this.
>
> The root cause of my difficulty is that it appears that I am unable to
> create new namespaces in post initialization hooks --
> e.g. $wgExtensionFunctions. Am I missing something like a function call to
> make post init creation of namespaces work; or is it just not supported
> anymore [2]?
>
> Alternatively; is there a method to 'hide' namespaces similar to how we can
> 'hide' special pages?
>
> Any other random ideas?
>
> If you're curious; we needed the new namespaces to support a 'scratch'
> space for translations to happen before we moved them into the highly
> protected MediaWiki namespace.
>
> [1] http://en.wikipedia.org/wiki/Rubber_duck_debugging
> [2] I had some code in 1.20 that created a namespace via a
> wgExtensionFunctions hook that I recall working does not
>
> --
> ~Matt Walker
> _______________________________________________
> Wikitech-l mailing list
> Wikitech-l@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
_______________________________________________
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to