Page MenuHomePhabricator

"File links" heading on File pages should include pagelinks to this file ([[:File:Example.jpg]])
Open, MediumPublicFeature

Description

A [[Test Page]] links to a file like [[:File:Foo.jpg|Bar]].
But the page File:Foo.jpg reads "There are no pages that link to this file."

  1. The page [[Test Page]] should be listed under == Page Links ==
  1. It would be more proper to differ between file links and file usage. In teh abovbe example it would be

"No pages use this file"
"1 page links to this file"

Examples: http://www.mediawiki.org/wiki/User:Subfader/Fujikato


Version: unspecified
Severity: enhancement

Details

Reference
bz30126

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:57 PM
bzimport set Reference to bz30126.
bzimport added a subscriber: Unknown Object (MLST).

You can use [[mw:Special:WhatLinksHere/File:Jquery_buttons.png]] to see the links. Maybe the message should be reworded from file links to file uses or so.

It's not a naming problem, it's a technical problem.

http://www.mediawiki.org/wiki/File:Jquery_buttons.png
"There are no pages that link to this file." is simply wrong.
http://www.mediawiki.org/wiki/User:Subfader/Fujikato does!

And to make it more clear the usage for files should be split into

File usage

"X pages use this file"

File links

"X pages link to this file"

I also wonder what influence the link= parameter for embedding images has on the File links section.

(In reply to comment #2)

It's not a naming problem, it's a technical problem.

The feature is only designed to show file uses, but when the feature was added, the message has the wording "file links". You can also add the really file links, but that is the work of Special:WhatLinksHere, where you can also see the file uses, but there also called "image link" (MediaWiki:isimage).

I see, renamed the heading manually.

Renaming bug. Apparently it's not related to the |link= parameter of a File link. I added the following to your example page:

'''[[:File:Hack-A-Ton-DC.png]]'''

And that didn't make "User:Subfader/Fujikato " show up under "File links" of that file either.

The thing is, there are two kinds of links. There are pagelinks (blue links one can click, like [[Article]] and [[:File:Example.jpg]]) and filelinks that actually embed an image. This section here is meant for the latter. The other kind of links are not supposed to show up here. For that there is "WhatLinksHere". The section should be renamed to "File usage" probably.

Closing as WONTFIX;

Message for heading has been updated in r97427.

I fixed teh confusion this way:

  • Heading reads "File usage" now
  • MediaWiki:Nolinkstoimage and MediaWiki:Linkstoimage adjusted to read "using" not "linking to" and link to Special:WhatLinksHere for links

http://www.mixesdb.com/db/index.php/File:2011-06-1X_-_East_Ender_Park,_Sonar_-4.jpg
http://www.mixesdb.com/db/index.php/File:2011-06-1X_-_East_Ender_Park,_Sonar_-2.png

Bryan.TongMinh wrote:

Using or usage is indeed a better wording for the heading, especially when used in conjunction with GlobalUsage.

As mentioned, the text needs adjustments too, not just the heading. That's why I re-opened the bug.

Hi. Thanks for reporting this bug. I was about to do the same.

Reading your discussion, there are two bugs here.

One (the one I encountered) is that [[File:foo.png]] are included in the "File links" section but [[:File:foo.png]] are not, which is relatively straightforward.

The other is the distinction between "File links" and "File usage" which is a more major change, and I would class that as a request for enhancement.

To expedite the fixing of the first issue, may I suggest making this issue refer to that and to file a separate issue for the second?

Thanks for your work on a marvellous tool which helps raise the world-mind's IQ :)

M

It's one and the same bug. [[:File:foo.png]] is a link. Pages using this create links to foo.png. These pages can be found via "What links here". On the file page only pages using the image (embedding a thumb) are listed, but the text talks about linking to which is wrong and confusing since "using" is more correct.

adem.rudin wrote:

This is a serious bug that greatly impacts maintenance on my wiki. The behavior is inconsistent and confusing.

Consider a the page "File:Diagram.png"

Case 1

The file is embedded in [[TestPage]] with the syntax "[[File:Diagram.png]]". The following things occur:
*The image is displayed on [[TestPage]].
*When viewing [[File:Diagram.png]], [[TestPage]] is listed under the "File Usage" heading.
*When viewing Special:WhatLinksHere/File:Diagram.png, [[TestPage]] is listed.

Everything behaves as expected.

Case 2

The file is embedded in [[TestPage]] with the syntax "[[:File:Diagram.png|Descriptive Text]]". The following things occur:
*The text "Descriptive Text" is displayed on [[TestPage]], with a link to [[File:Diagram.png]]
*When viewing [[File:Diagram.png]], The "File Usage" heading claims "There are no pages that link to this file".
*When viewing Special:WhatLinksHere/File:Diagram.png, [[TestPage]] is listed.
*When viewing Special:UnusedFiles, [[File:Diagram.png]] is listed.

The problem is, Case #2 is the norm on my wiki! 50% of the files are word docs, PDFs, etc that are linked in-line with descriptive text, rather than embedded directly like a an image file would be. Needing an extra click to view Special:WhatLinksHere is mildly annoying, but Special:UnusedFiles is completely broken. There's no way to at-a-glance find truly orphaned files.

A Special page that lists files that are TRULY orphaned - not embedded OR linked anywhere - is a MUST HAVE. It would also be convenient to list both "pages used" and "pages linked" directly on the file's page.

The problem is still here, MW 1.26.2

Aklapper changed the subtype of this task from "Task" to "Feature Request".Feb 4 2022, 12:24 PM
Aklapper removed a subscriber: wikibugs-l-list.