Topic on Project:Support desk

[RESOLVED] Can't create pages in custom namespace

2
84.167.1.60 (talkcontribs)

Hello,
I installed a wiki (1.24) which worked just fine.
I created various custom namespaces via LocalSettings.
When I now try to create a page in one of these namespaces, the page gets created in the main namespace. Lets say I create the page: MyNamespace:Examplepage, I can already see in the editing URL that the page gets created in the main namespace
secretwiki.com/index.php?title=Examplepage&action=edit
instead of
secretwiki.com/index.php?title=MyNamespace:Examplepage&action=edit
does anyone has an idea what this could be?

When I select to move a page, I can see the various created namespaces, so I guess they are installed correctly.
But when i manually try to move a page to one of these namespaces, it says that origin and destination is the same, and therefore can't move the page.

Best regards and thanks for your help

84.167.24.101 (talkcontribs)

I got it to work! In case anyone has the same problem, I used this scheme to create the new namespaces:

// Define constants for my additional namespaces.
define("NS_FOO", 100); // This MUST be even.
define("NS_FOO_TALK", 101); // This MUST be the following odd integer.
 
// Add namespaces.
$wgExtraNamespaces[NS_FOO] = "Foo";
$wgExtraNamespaces[NS_FOO_TALK] = "Foo_talk"; // Note underscores in the namespace name.

And in the second part, I accidentally set "NS_FOO" and "NS_FOO_TALK" in quotation mark.

Reply to "[RESOLVED] Can't create pages in custom namespace"