Last modified: 2008-06-12 09:53:56 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 9068 - Typed links don't work well with interwiki links
Typed links don't work well with interwiki links
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
All All
: Normal normal (vote)
: ---
Assigned To: Markus Krötzsch
: patch, patch-need-review
Depends on:
  Show dependency treegraph
Reported: 2007-02-22 12:24 UTC by denny vrandecic
Modified: 2008-06-12 09:53 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---

patch SMW_SQLStore.php's updateData() (1.08 KB, patch)
2007-03-19 09:32 UTC, S Page

Description denny vrandecic 2007-02-22 12:24:47 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.
Comment 1 S Page 2007-03-19 09:30:16 UTC
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.
Comment 2 S Page 2007-03-19 09:32:34 UTC
Created attachment 3362 [details]
patch SMW_SQLStore.php's updateData()
Comment 3 Markus Krötzsch 2007-10-03 18:06:39 UTC
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 ...).
Comment 4 Markus Krötzsch 2008-06-12 09:53:56 UTC
The new storage engine now supports interwiki links properly, and can execute all queries using them.

Note You need to log in before you can comment on or make changes to this bug.