Not returning properties and/or categories in custom namespaces

From semantic-mediawiki.org

Try setting $smwgNamespaceIndex.

22:10, 30 April 2013

Already done (see original post) and set to 100 as such:

$smwgNamespaceIndex = 100;
15:01, 1 May 2013

You cannot set two different extensions to the same namespace ID. That's what you are just doing.

17:12, 1 May 2013

Sorry, I should have clarified - I grabbed that example off the extension page. Mine is actually set to 500 to avoid that problem.

Wikilog::setupNamespace( 500, 'Blog', 'Blog_talk' );

Though it may be possible that it's conflicting with something else I have installed. Is there a way to check?

23:34, 2 May 2013

Check, whether by the time you set $smwgNamespacesWithSemanticLinks[NS_BLOG] = true; NS_BLOG is defined. This implies that Wikilog::setupNamespace( 500, 'Blog', 'Blog_talk' ); has already been invoked.

You can call $wgDebugComments = true; wfDebug ('NS_BLOG = ' . NS_BLOG); to check the value of the constant.

You can also use {{NAMESPACENUMBER:(full page name)}} parser function to check the number of any namespace in the wiki.

12:14, 3 May 2013

Check, whether by the time you set $smwgNamespacesWithSemanticLinks[NS_BLOG] = true; NS_BLOG is defined. This implies that Wikilog::setupNamespace( 500, 'Blog', 'Blog_talk' ); has already been invoked.

It is, yes.

You can call $wgDebugComments = true; wfDebug ('NS_BLOG = ' . NS_BLOG); to check the value of the constant.

Not quite sure what I'm doing with this - shove them both in LocalSettings? Doing so gets me a new error: Fatal error: Call to undefined function wfDebug() in /home/xmm/public_html/w/LocalSettings.php on line 223

21:28, 3 May 2013

Did you find the solution? I have the same problem, although with different defintion of namespaces. See my latest post about this issue (saw this post right after that..).

Thanks!

22:35, 30 August 2013

I never did! Eventually sort of gave up, though I pop in occasionally to see if anything new has come up. I'll keep an eye on your post!

Sorry to not have better news.

14:54, 11 September 2013

It looks to me like this should be a very simple fix, if I'm reading things right...

First of all, you should switch to using defined constants instead of magic numbers:

## Define namespaces
define( "NS_BLOG", 500 );

...as kgh recommended. Of course, you could just use the magic number 500 in both places, but it's better to use a defined constant to prevent mistakes.

Then register your namespace using the wikilog extension using your defined constant instead of the magic number "500":

Wikilog::setupNamespace(NS_BLOG, 'Blog', 'Blog_talk' );

...i.e., that's the same as writing $wgExtraNamespaces[NS_BLOG] = "Blog"; to declare the new namespace, except it also does some additional setup related to the Wikilog extension, and ensures you declare the namespace correctly.

Now your namespace is set up, set it to allow semantic properties by adding

$smwgNamespacesWithSemanticLinks[NS_BLOG] = true;

...hope that helps.

21:52, 14 April 2014

I tried a large number of things until I figured out that I was making my smwgNamespacesWithSemanticLinks declarations *before* the enableSemantics call. When I moved them after it (as described in the documentation, although only briefly), everything started working great.

03:16, 22 May 2014