Last modified: 2007-09-25 07:12:35 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T13060, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 11060 - SMW removes namespace from pages with properties
SMW removes namespace from pages with properties
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
unspecified
All All
: Normal minor (vote)
: ---
Assigned To: Markus Krötzsch
http://ontoworld.org/wiki/SMW_unit_te...
:
Depends on:
Blocks:
  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: ---


Attachments

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.


Navigation
Links