Last modified: 2008-06-12 09:53:56 UTC
The current implementation does not deal well with interwiki links, i.e. if you
have a link like [[looking forward to::m:Wikimania 2007]] it will actually save
a triple (page) (looking forward to) (Wikimania 2007), and the information about
the external link is lost.
The interwiki information is lost in SMW_Storage.php's smwfStoreRelation() or
its replacement SMW_SQLStore.php's updateData(). SMW correctly passes it a
Title object as the relation's object_title that has an mInterwiki set to the
interwiki prefix ('m' in this example). But when smwfStoreRelation() stores the
relation's object in the object_title column of smw_relations, it only stores
the cleaned up title ("Wikimania_2007" in this example).
A fix (patch attached) might be for smwfStoreRelation() to prepend
$object_title->getInterwiki() and a colon in the object_title column if
getInterwiki() is not the null string. Or add an interwiki column to
This seems to work for me but the inline query displays isn't right; it doesn't
display the interwiki prefix although its hyperlink is to the other wiki.
Created attachment 3362 [details]
patch SMW_SQLStore.php's updateData()
Adding interwiki prefixes to titles is not quite right either, as this would probably mix up with namespaces (the namespace should go in front of the prefixed title, not between namespace and titletext).
One option would be to filter out interwikilinks earlier on (reject them for annotation). Alternatively, one would really need that extra table column (and use it in all queries ...).
The new storage engine now supports interwiki links properly, and can execute all queries using them.