Page MenuHomePhabricator

The "File usage" section of a file description page incorrectly suggests there are "no links to this file"
Open, Needs TriagePublic

Description

See the screenshot below. I'm not sure how to troubleshoot or replicate this issue. If someone gives me direction, I may be able to provide more info. I just stumbled upon a file page where the "What links here" did not match the "File usage" and I would expect them to match.

image.png (1×751 px, 168 KB)

Event Timeline

"File usage" only lists pages that embed the file directly on-page ([[File:Example.png]]); "What links here" also lists all pages that link to the file's description page ([[:File:Example.png]]). I've always thought the messaging in the "File usage" section was misleading.

I guess it ought to say "No pages include this file. See files that link to this page." Where files that link to this page is a link to the relevant Special:WhatLinksHere page?

You can modify the message via MediaWiki:Linkstoimage (for files that are used on at least one page) and MediaWiki:Nolinkstoimage (for files that are unused). I've modified both of these on a couple of the wikis I am/was an administrator on, see examples on Yugipedia: MediaWiki:Linkstoimage, MediaWiki:Nolinkstoimage.

Thanks for that info, but I think this is generically/universally wrong and the wording should be fixed. Can you point me to where I'd submit a patch for this wording?

Possibly TranslateWiki, but honestly I'm the wrong person to ask.

Krinkle renamed this task from "What links here" does not match "File usage" for a file to The "File usage" section of a file description page incorrectly suggests there are "no links to this file".Jun 19 2021, 3:14 AM

Updated title to match the latest understanding of the issue.

The "File usage" section indeed reports embedding of the file (also known as "file usage" or "file links"). See also "global file usage". Such "file link" is differnet from a "page link" which is merely a link to the file's description page as opposed to actually displaying a media item on a page.

On the "What links here" page you can choose to "Hide (page) links" or "Hide file links". When flipping these switches the right way, one can end up displaying only the file links, for example. The functionality is confusing, I think, but I do think from a technical perspective it is currently in a way that is ideal for the end-user. That is, on the file description page I think it makes sense to default to listing (only) embedded use of the media file and not regular plain links.

The issue this task is about then, is the wording when there is no file usage.

I checked commons wiki wmf.9. For example, https://commons.wikimedia.org/wiki/File:Trey_Songs_(7082264395).jpg in File usage on Commons - There are no pages that use this file.

Screen Shot 2021-06-21 at 3.54.12 PM.png (578×2 px, 145 KB)

The messages on translatewiki do not mention links:
MediaWiki:Nolinkstoimage on translatewiki: There are no pages that use this file.

MediaWiki:Linkstoimage on translatewiki:The following {{PLURAL:$1|page uses|$1 pages use}} this file: