Last modified: 2012-11-09 11:51:56 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 T41392, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 39392 - datatype URL / query parameter link=none does not work as well as plain printouts #- (1.8 alpha)
datatype URL / query parameter link=none does not work as well as plain print...
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
unspecified
All All
: High normal with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
:
: 41275 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-15 20:27 UTC by [[kgh]]
Modified: 2012-11-09 11:51 UTC (History)
4 users (show)

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


Attachments

Description [[kgh]] 2012-08-15 20:27:50 UTC
The query parameter link=none does not have any effect for properties of datatype URL. The result is still shown as a link. Likewise it is not possible to create a plain printout with #-
Comment 1 Markus Krötzsch 2012-10-17 18:46:40 UTC
Fixed in https://gerrit.wikimedia.org/r/#/c/28393/
Comment 2 Markus Krötzsch 2012-11-06 14:43:21 UTC
I have to re-open this, since there is a more fundamental issue here that needs to be discussed. The solution I implemented causes other problems (reported in Bug 41275): it is now impossible to make a URL value into a link even if one wants to. As it is now, we do not know of any way to return a URL value that is not linked by MediaWiki automatically but that is linked if you put it in [ ] (e.g. in a template). So we can only have either of these behaviours.

I suggest to have the following:

* Output format #- returns the plain URL string, as it did originally. This will be turned into a link by MW.
* A new output format #nowiki returns an escaped URL string that is not turned into a link by MW (and cannot be turned into one with [ ] either).

The question is: what should link=none do? Normally, it means that the output is not linked *actively* by SMW (adding [ ] explicitly). So link=none does mean the same as #- (leaving something away, returning the data in a less processed state). But it is not intuitive that link=none does produce a link in the final output (not in HTML, just on the page). Any comments?

Btw. note that #nowiki could also be supported for string data: there it would escape the string like for datatype Code, so that it is not acted on by MW at all. It seems a fairly useful keyword to have as an output format, since it is already a known term in MW.
Comment 3 Markus Krötzsch 2012-11-06 14:44:22 UTC
*** Bug 41275 has been marked as a duplicate of this bug. ***
Comment 4 [[kgh]] 2012-11-06 15:44:12 UTC
+ for your suggestions

Concerning link=none we could adjust the documentation in a way stating it refers to internal links only, which is both the current and future behaviour. Adding an alias link=nointernal would perhaps be a kind of overdoing it.

Supporting #nowiki for datatype string would be nice, too.
Comment 5 Markus Krötzsch 2012-11-09 11:51:56 UTC
This should do it when merged: https://gerrit.wikimedia.org/r/#/c/32555/

This restores the old behaviour on all cases but adds a new #nowiki outputformat to avoid linking the hard way.

"""
Changed the behaviour to be as follows:
* if linking is enabled ("link=all", default), URLs will be made into an explicit link using [ ] in wiki and <a> in HTML
* if linking is disabled or outputformat "empty" is used (#- or simply #), then URLs will be returned as plain strings in wiki and HTML; in wiki this will mean that the URL will still be linked if MW is configured to link such strings automatically (default)
* if the new outputformat "nowiki" is used (#nowiki), then the URL string will be escaped to prevent MW from making a link of it, so it appears as a plain string in HTML and wiki alike; this changes the string so that it is no longer a valid URL
"""

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


Navigation
Links