When is the Widget namespace created?

Jump to: navigation, search

Yes, you should be seeing Widget namespace on Special:AllPages right after adding it to LocalSettings.php

Do you see any error messages in error log?

157.166.159.23021:50, 3 February 2012

Thank you for your response.

I have error reporting turned on and there are no errors showing up. Additionally, I checked the Apache error log and did not see anything there either.

So, I decided to set up a clean install of MW 1.15.1 and try out the Widgets extension there. The namespace showed up without any problem.

So, I had to figure out what was causing the namespace not to show up on the production site.

There appears to be a conflict with a custom namespace that was set up for portal pages. If I comment out the following lines in LocalSettings.php, then the Widget namespace appears:

$wgExtraNamespaces =
       array(100 => "Portal",
             101 => "Portal_Talk"
             );
$wgNamespacesWithSubpages[100] = true;

Do you have any idea how to fix this? We definitely do not want to stop using portal pages on our wiki.

Thank you for any help you can give me with this.

Patricia Barden 20:06, 6 February 2012 (UTC)

Patricia Barden20:06, 6 February 2012

Hmm, I have a similar setup on my wiki with a working widgets extension. I guess you have to use the ns constant instead of the ns number. Did you define your namespaces?

# Define namespaces
define("NS_PORTAL", 100);
define("NS_PORTAL_TALK", 101);

# Name namespaces 
$wgExtraNamespaces[NS_PORTAL] = "Portal";
$wgExtraNamespaces[NS_PORTAL_TALK] = "Portal_Talk";

# Subpages for namespaces
$wgNamespacesWithSubpages[NS_PORTAL] = true;

Cheers

[[kgh]]20:15, 6 February 2012

That works just great! Thanks very much for your help.

Patricia Barden21:50, 6 February 2012
 
 
 
Personal tools

Variants
Actions
Navigation
Support
Download
Development
Communication
Toolbox