Problems adding namespaces

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Problems adding namespaces

iltk
Hey all,

I have a current installation of semantic mediawiki, I originally
had 1 extra namespace defined in localsettings like this:

$wgExtraNamespaces =
    array(101 => "Policy",
          101 => "Policy Discussion"
          );

$smwgNamespaceIndex = 102;

include_once('extensions/SemanticMediaWiki/includes/SMW_
Settings.php');
enableSemantics('domainname');

Everything worked great.

Now I need to add some additional namespaces, I added these
so I now have this in my localsettings:

$wgExtraNamespaces =
    array(101 => "Policy",
          101 => "Policy Discussion",
          102 => "Forum",
          103 => "Forum Discussion",
          104 => "Glossary",
          105 => "Glossary Discussion",
          106 => "Project",
          107 => "Project Discussion",
          108 => "Portal",
          109 => "Portal Discussion"
          );

$smwgNamespaceIndex = 110;

include_once('extensions/SemanticMediaWiki/includes/SMW_
Settings.php');
enableSemantics('localhost');

But now all my attributes and datatypes are just broken red
links.

I tried initialising tables via smw special page, tried refreshing
pages as admin, tried doing a hard browser refresh, emptying
cache etc.. but nothing seems to work.

If I set everything back to only the original namespaces
everything works again, but I realy need to add these extra
namespaces.

Any idea what could be wrong?




-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: Problems adding namespaces

S Page
[hidden email] wrote:

> I have a current installation of semantic mediawiki, I originally
> had 1 extra namespace defined in localsettings like this:
>
> $wgExtraNamespaces =
>     array(101 => "Policy",
>           101 => "Policy Discussion"
>           );
>
> $smwgNamespaceIndex = 102;
>
> include_once('extensions/SemanticMediaWiki/includes/SMW_
> Settings.php');
> enableSemantics('domainname');
>
> Everything worked great.
>
> Now I need to add some additional namespaces,
 > ...
> But now all my attributes and datatypes are just broken red
> links.

Lots of links in the pagelinks database table, and all the properties in
the smw_attributes, smw_relations, and smw_specialprops database tables
will have the wrong namespace identifiers.  Database records that
pointed to the Relation namespace now point to your Forum namespace, etc.

If you create a new relation on a new page, does that show up in the
factbox?  If so, your installation is OK but you'll have to purge a lot
of pages, starting with the Type namespace, then Attribute namespace,
then Relation, then regular pages.

Perhaps you could have given those new namespaces IDs starting higher up
e.g. at 110, thus
           101 => "Policy Discussion",
          # Note: gap here for SMW namespaces
           110 => "Forum",
           111 => "Forum Discussion",
           112 => "Glossary",
          etc.


--
=S

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: Problems adding namespaces

iltk
On 15 Jun 2007 at 18:28, S Page wrote:

<snip>

> Lots of links in the pagelinks database table, and all the properties in
> the smw_attributes, smw_relations, and smw_specialprops database tables
> will have the wrong namespace identifiers.  Database records that
> pointed to the Relation namespace now point to your Forum namespace, etc.
>
> If you create a new relation on a new page, does that show up in the
> factbox?  If so, your installation is OK but you'll have to purge a lot
> of pages, starting with the Type namespace, then Attribute namespace,
> then Relation, then regular pages.
>
> Perhaps you could have given those new namespaces IDs starting higher up
> e.g. at 110, thus
>            101 => "Policy Discussion",
>  # Note: gap here for SMW namespaces
>            110 => "Forum",
>            111 => "Forum Discussion",
>            112 => "Glossary",
>  etc.
>
>
> --
> =S

This solution worked great.

I started the new namespaces at 130 and up just in case later
versions of smw adds some new namespaces and left  
$smwgNamespaceIndex = 102; so the new namespaces are
added after the ones smw uses.

Everything now works as if nothing happened, would have
been a bummer not to be able to add these new namespaces
as I'd like to keep that content separate from what's in the
default namespace.

Thanks for the help!

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user