Page MenuHomePhabricator

"What links here" should show only the template linking, not all pages containing the template. Same for "pages that use this image".
Closed, DeclinedPublic

Description

When a pages is linked to by a template, the "what links here" page of the
target page show the template and all pages containing this template. Similarly,
an image which is used in a template will list all pages containing the template
as using the image. To make matters worse, if the link/the image is removed from
the template, the list will not be up to date until *every* page that uses the
template is edited.

The best solution would IMHO be to show only the template itself on the "what
links here" (resp. "pages that use this image") list - we would have no
superfluous links then, and no problem with keeping the through-a-tem,plate
reverse links updated. If i really need all the pages that use the template, I
could use the template's "what links here" page easily enough.

I can't think of any situation where the current behavior would be desirable.
This is espacially annoying if you try to unlink an image that has to be delete,
as you have to find the few pages that use the image directly, somehow. Please
consider changing this - I have heard many complaints about this behaviour, many
users are confused by it (especially because the list is never relly up to
date), and those who understant it find it annoying.

(the URL given is an Image on ther german WP that is used by some templates
which are in turn used by many pages)


Version: unspecified
Severity: enhancement
URL: http://de.wikipedia.org/w/index.php?title=Bild:Baustelle-klein.png
See Also:
http://bugzilla.wikimedia.org/show_bug.cgi?id=4588
http://bugzilla.wikimedia.org/show_bug.cgi?id=3241
https://bugzilla.wikimedia.org/show_bug.cgi?id=12396

Details

Reference
bz1392
ReferenceSource BranchDest BranchAuthorTitle
repos/releng/release!42T339275mainkharlanStart branching ReportIncident for Wikimedia production
repos/mediawiki/services/ipoid!33fix-risk-importmainstranFix incorrect validity check in getEntityRisks function
repos/mediawiki/services/ipoid!32fix-import-bugsmainstranGuard against false values in behaviors and proxies
Customize query in GitLab

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 21 2014, 8:09 PM
bzimport set Reference to bz1392.
bzimport added a subscriber: Unknown Object (MLST).

Full ack. "What links here" is one of the nicest features in Wikipedia, but
navigation elements make it nearly unusable due to the bug described here.

jnc wrote:

I agree that the behaviour you note is problematic. However, any
change would have to make sure that it doesn't create as many problems
as it solves - e.g. without a note on article page A that it includes
image I (via template T), when I is updated the code would have to do
a lot of (potentially recursive) checking (i.e. after checking "what
links here" on I, and discovering T, it would then have to check "what
links here on T", and so on) to note on all pages that (eventually)
include that image that they need to be re-rendered.

We have quite a number of bugs of this form with templates and/or
categories - see, for example,
[http://bugzilla.wikimedia.org/show_bug.cgi?id=939 bug 939]. The bug
you mention, where the "what links here" list on the image is not
fixed when the template is edited, is basically the same bug as the
category problem in bug 939.

puzzlet wrote:

*** This bug has been marked as a duplicate of 939 ***

zigger wrote:

Reopened. Bug 939 asks for link tables and rendered pages to be effectively
current with template changes, which is more work, whereas this request seems to
ask for the Special:Whatlinkshere page to show less.

wiki.bugzilla wrote:

*** Bug 5691 has been marked as a duplicate of this bug. ***

Navigational templates are only getting more elaborate over time. Many link to
dozens of items, making "What links here" practically unusable. Fixing this
problem would be a great aid to discovering and building up the web of
connections among articles.

If it links from the page, it links from the page.
It's not possible to determine what was "through" a template -- in particular
given the complex ability to generate links out of template interactions and
conditional code.

Yes, I'm aware of that by now. But I think it would be very handy to have that
ability. It would become possible if/when we insist on "syntactically complete"
templates, which has often be discussed, and I hope will come in the Golden Days
Of The Real Parser.

So, while I'm aware that it's impossible with the current database scheme and
parser, and would be non-trivial to implement even if that would change, I
request to leave this bug open as a desirable enhancement. I'll not reopen the
bug myself though.

djevrek wrote:

See also http://bugzilla.wikimedia.org/show_bug.cgi?id=4588 "Group pages by
templates in list of file links on Image page" and
http://bugzilla.wikimedia.org/show_bug.cgi?id=3241 "Transclusion should produce
tree-like results in "What links here" ".

You'll excuse my programming ignorance, but could there be any way of exploiting
whatever makes <noinclude></noinclude> work to prevent transcluded backlinks?

Or failing that, is there any way the programming could make a checklist of
what's on the transcluded templates, and then "manually" remove them from the
"What links here" page?

Well, what if we just use an outside link, e.g. [[w:France|France]] instead of
[[France]]? The only problem I can see with this would be cosmetic to the
reader (different link color), and a little more wikicode. Surely it wouldn't
be that hard to make a protocol that would take care of this, e.g. one could
enter [[t:France]] and it would look graphically resemble an internal link while
executing [[w:France|France]]?

I know this is not an 'elegant' solution but I think it would work well enough
for our purposes.

[Removing RESOLVED LATER as discussed in http://lists.wikimedia.org/pipermail/wikitech-l/2012-November/064240.html and closing as RESOLVED WONTFIX as per comment 7 and comment 11]

Note: Primehunter made a great list of many of the duplicate onwiki requests for this feature:
https://en.wikipedia.org/w/index.php?title=Wikipedia:Village_pump_%28technical%29&oldid=724187004#What_links_here_.2F_templates

I believe the focus of this request has moved to T5241: Transclusion should produce tree-like results in "What links here" as the best feasible outcome.