Page MenuHomePhabricator

[[:File:TheFile.ext]] does not count as a link in 'File Links' but shows up in 'What Links Here'
Closed, DeclinedPublic

Description

Author: peter.urda

Description:


Version: 1.15.x
Severity: normal

Details

Reference
bz22943

Event Timeline

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

peter.urda wrote:

If a user links a file page, in a way such as [[:File blah blah]] or [[:Media blah blah ]] or [[:Image blah blah]] to avoid displaying a picture, but still have a link to the media page a strange issue occurs. The file page's 'File Links' section does not recognize the relation and says "There are no pages that link to this file". BUT If you check the "What links here" in the side bar, the page that is linking it is displayed.

Shouldn't the "File Links" section reflect this? Because it doesn't, the file is counted as an orphan, when it clear is not under Special:Unused files

peter.urda wrote:

(In reply to comment #0)

Fat fingered and hit enter too soon when creating this bug, see next comment.

Bryan.TongMinh wrote:

This is on purpose; file links only includes pages where the image is actually shown.

peter.urda wrote:

Which is rediculous, since a page can link to a PDF or document file, which is considered being used, and the Mediawiki Engine doesn't use it. Perhaps you could carry that idea to images, but you can't always "show" a document, and thus why the system is broken.

thor.malmjursson wrote:

Urda, ridiculous or not, the system isn't broken - it's *meant* to work like that, as Bryan said.

jon.1234 wrote:

Is there any way round this? An extension, for example?

For PDF, DOC and other media files - and where the file can be downloaded from an external site - I link to the 'File:' page rather than link straight to 'Media:'.

It would make much more sense if the 'File links' showed the pages which linked to the 'File:' page.

Thank you.

It would be fairy easy to write an extension that added another section for normal (non-embeded) links using ImagePageAfterImageLinks hook, if one was so inclined.

It would make much more sense if the 'File links' showed the pages which linked
to the 'File:' page.

Thats very debatable. For the normal case of jpeg images it would not make sense. However, It might make sense to make an exception such that if the relevant media handler does not support embedding files of that type, it shows page links instead, but that might also be confusing when the section switches meaning depending on type of image.

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