Last modified: 2011-03-13 18:04:29 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 T2860, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 860 - Wikilink in template not recognized
Wikilink in template not recognized
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
Templates (Other open bugs)
unspecified
PC Windows XP
: Lowest minor with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
http://en.wikipedia.org/wiki/User:Sch...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2004-11-10 21:00 UTC by Schnee
Modified: 2011-03-13 18:04 UTC (History)
2 users (show)

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


Attachments

Description Schnee 2004-11-10 21:00:22 UTC
The following template/article combination is not processed correctly:

---

Template contents: [[{{{1}}}|]]

Article contents: {{Template|Main page}}

---

This should result in a link to the Main page (à la [[Main page|]]); however,
instead of the link, the unparsed text is inserted into the article. Removing
the | or adding text after it causes the template contents to be parsed and
interpreted correctly.
Comment 2 lɛʁi לערי ריינהארט 2004-11-12 03:26:37 UTC
Dear friends,

I identified the following:
a) "Main page" does not have have a prefix. What should [[Main page|]] be? 
The same also with [[Esperanto|]] and other articles of the main namespace.

b) It would work with [[:fr:Main Page]], [[:fr:Main Page|]] but please 
note, that normaly "Page" is only redirected with capital "P" in other 
Wikipedias and [[:fr:Main page]], [[:fr:Main page|]] will fail. Maybe this 
should be changed.

c) More problematicaly is, that the template does not work with somethink 
like <nowiki>{{template_name|User:user_name}}</nowiki>.
You can find many examples at
http://en.wikipedia.org/wiki/User:Gangleri/tests/temp_2 and 
http://test.wikipedia.org/wiki/User:Gangleri/tests/temp_2 .

d) I could not find a workaround changing the template to somthink like 
<nowiki>[[{{{1}}}|{{{2}}}]]</nowiki> as available at 
http://en.wikipedia.org/wiki/Template:Template_for_testing_3 and 
http://test.wikipedia.org/wiki/Template:Template_for_testing_3 and using an 
empty seccond parameter.

These examples are available at 
http://en.wikipedia.org/wiki/User:Gangleri/tests/temp_3 and 
http://test.wikipedia.org/wiki/User:Gangleri/tests/temp_3 .

Regards Reinhardt
Comment 3 Rowan Collins [IMSoP] 2004-11-16 12:57:21 UTC
There is a very simple explanation for this: the "pipe trick" (where
[[Namespace:Title|]] becomes [[Namespace:Title|Title]]) is processed when the
page is *saved* (or previewed), not when it is *rendered*. So using it in
combination with a template has no meaning, and is quite rightly treated as
invalid syntax. 

As far as I know, there is only one way to achieve the desired effect, and that
is to have two parameters, perferably named, so that {{template
name|linkto=User:Foo|linkas=Foo}} can become [[User:Foo|Foo]]. In many cases, it
will actually be the *first* parameter that is redundant, since you will be able
to say {{template|user=Foo}}, having defined the template as
"[[User:{{{user}}}|{{{user}}}]]".

I'm going to close this as "wontfix", because it seems to me to be a very minor
problem (very few circumstances where this would be needed) which would require
a rather major change to the software (processing of [[Foo:Bar|]] as valid
syntax during rendering, not just substituting it on save).
Comment 4 Schnee 2004-11-16 17:05:47 UTC
OK - thanks for your comments. 

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


Navigation
Links