Last modified: 2014-11-17 10:35:33 UTC
When a template directly introduces a link to a target page, the "what links here" list for the target page should list the template as a link to the target, but it should not list a page that uses the template as links to the target (unless the using page also has direct links to the target.) Alternative: Treat links generated by a template similarly to links via a redirect: that is, list the template, and then list all pages linked via the template indented under the template link. Justification: "what links here" is used by people who move a page to find and repair all of the links to the page. We also use "what links here" to gauge the relative importance of several pages when determining whether a particular page should retain the "main title" when disambiguation is needed. A third major use of the "what links here" is to generate the list of "most needed articles." In all three cases, the resultes rae severely distorted when th epage is linked from a template. For example, a completely obscure Football coach named Clyde Snerd suddenly has 50 links when he is one of 50 football coaches listed in a template of "coaches of the Lower Smedley football club." If I move his page to "Clyde Snerd (football coach)" I must then check all 50 pages to see if any of them have non-template references.Changiong e template first does not help, because the resulting updatea process (apparently) runs in the background and can take quite a long time. The result on the "most wanted articles" list is dramatic: all of the topmost "most wanted" articles are due to inclusions in templates.
I don't think this is possible with the current schema which tracks links between pages. Furthermore, I don't see the utility in changing things.
*** Bug 21266 has been marked as a duplicate of this bug. ***
Oh, great. The fact that there is one person somewhere who FAILS to see the utility is now considered a cogent point. When I move an article and then click on "what links here", I sometimes see a couple of hundred links nearly all of which result from pages using a template. After editing the template to link to the new title, I want to see the (usually few) links from articles themselves, rather than those resulting from a template. Currently the only way to do this is to wait 24 hours so that when you view "what links here", the template links will no longer link to the old title. Currently one can click on "hide redirects"; there should be a similar thing to hide links resulting from articles' use of templates. I reported the above as a bug, and it got marked as a duplicate of this even though it proposes something DIFFERENT.
It's a bit different, but the problem is the same: currently templates are expanded and only after that links are parsed and replaced. To fix this, we should change parsing older to parse links in the same time as we expand templates and change the pagelinks database table to know if the link is directly inserted in the page or comes through a template. Also a problem would be parameter substitution: {{Some template|link=[[Some page]]}} or {{Link|page=Some page}} where Template:Link contains something like "[[{{{page}}}]]", for those two cases, should the link be considered as comming from the page, or the template? (first example might be easier than the second one)
sorry: order, not older.
*** Bug 28855 has been marked as a duplicate of this bug. ***
I posted that duplicate bug, and I agree that it's the same problem as already given here. I don't know which of the proposed solutions should be used to fix this bug, but it desperately needs to be fixed.
@Alexandre Emsenhuber: --- Also a problem wouldbe parameter substitution: {{Some template|link=[[Some page]]}} or {{Link|page=Some page}} where Template:Link contains something like "[[{{{page}}}]]", for those two cases, should the link be considered as comming from the page, or the template? (first example might be easier than the second one) -- Those cases should clearly be considered as coming from the page calling Template:Link, since "some page" is linking data stored in the calling page, not the template.
(In reply to comment #8) > @Alexandre Emsenhuber: > > --- > Also a problem wouldbe parameter substitution: {{Some template|link=[[Some > page]]}} or {{Link|page=Some page}} where Template:Link contains something like > "[[{{{page}}}]]", for those two cases, should the link be considered as comming > from the page, or the template? (first example might be easier than the second > one) > -- > > Those cases should clearly be considered as coming from the page calling > Template:Link, since "some page" is linking data stored in the calling page, > not the template. Yeah, that's easy to say for a human. But a piece of software is likely not going to able to distiguish that. for example: Template:Foo contains: > This is a [[department]] [[portal]]. > ---- > {{#ifeq: {{{type|normal}}} | special | Welcome to the [[special]] > department. | Welcome to the department page of the [[normal people]].}} Department:Special contains: > {{Foo|type=special}} > Blablablabla. > [[Category:Departments|Special]] Does the link to [[special]] come from the template or from the article ? The answer to this doesn't matter and likely not obvious, but untill the parser has been rewritten and world piece has been made I dont think such advanced extractions can be made from a simple page with templates. That doesn't mean we can't do any extractions at all. A simple way to approach this bug's goal would be to compare links generated from {{Foo}} to whatever the template call was (eg. {{Foo}}), and whatever was added consider that caused by the article, and the rest to be coming from the template and thus further down the tree on WhatLinksHere. (things to keep in mind though are constructions with <includeonly> and the like, and comparisons to {{PAGENAME}} etc.)
@krinkle I'm not sure it has to be that complicated. Any time a template wraps a parameter in [[ ]], it's link data the calling page is responsible for. Otherwise, it's link data stored in the template. Though comparing links from the template and the template call, as you suggest, may be helpful. I'm sure there are hard cases which may be generated what might be considered categorisation errors, but this system doesn't have to be perfect in correctly including/excluding templates, as long it categorises links one way or the other. (I'm imagining there would be a switch so you could choose to look at page links, templates links, or both together.)
*** Bug 17728 has been marked as a duplicate of this bug. ***
Sounds like bug 1392
Or like Bug 3241 - Transclusion should produce tree-like results in "What links here"