Last modified: 2007-09-25 07:12:35 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 11060 - SMW removes namespace from pages with properties
SMW removes namespace from pages with properties
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
All All
: Normal minor (vote)
: ---
Assigned To: Markus Krötzsch
Depends on:
  Show dependency treegraph
Reported: 2007-08-25 05:42 UTC by S Page
Modified: 2007-09-25 07:12 UTC (History)
0 users

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


Description S Page 2007-08-25 05:42:31 UTC
Annotating a link to a wiki page with a property should not change how it displays.  But SMW 1.0pre-alpha3 doesn't display the namespace part of the page.

<nowiki>[[Help:PageName]]</nowiki> displays as Help:PageName,

but after annotation, <nowiki>[[MyRelation::Help:PageName]]</nowiki> displays in text (and the factbox, and query results) as just PageName without the "Help:" prefix.

In SMW 0.7, the same annotation displays in text and the factbox with the "Help:" prefix; it is only in query results that "Help:" does not appear.
Comment 1 S Page 2007-08-25 06:14:30 UTC
a) The namespace prefix vanishes in display because SMW_DV_WikiPage.php's getShortWikiText returns
  [[:' . $this->m_prefixedtext . '|' . $this->m_caption . ']]';

The alternate text displayed is m_caption, which was set to $this->m_textform which was set to $this->m_title->getText() which doesn't include the namespace.

b) The namespace prefix vanishes in the factbox because it invokes getText() which calls getLongWikiText() which provides $this->m_textform  as the alternate text.

Hiding the namespace in text and the factbox is misleading and a change from SMW 0.7.  Hiding the namespace in query results is what SMW 0.7 did, but maybe it should be under user control.
Comment 2 Markus Krötzsch 2007-09-25 07:12:35 UTC
Fixed. Datavalues of type page now behave as follows:

* getShortWikiText uses the caption if given, and otherwise the full prefixed text.
* getLongWikiText uses the abbreviated form without prefix whenever linking is active. If no link is created, then the full prefixed name is printed so that all information is always accessible.
* same for the HTML versions

This behaviour is correct, but might be surprising for developers (since the "long text" in this particular case is actually shorter in most cases). It might be good to think of "long" as "Factboxversion" and of "short" as "inline version".

I also changed all query printers to use the "long" text in order to keep results concise.

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