Last modified: 2011-04-30 01:16:46 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T20784, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 18784 - Internal links like [[File:Foo|caption]] should read 'caption', not 'File:Foo' when Foo is not an image
Internal links like [[File:Foo|caption]] should read 'caption', not 'File:Foo...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.14.x
All All
: Normal major (vote)
: ---
Assigned To: Nobody - You can work on this!
: parser
: 22344 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-05-13 15:33 UTC by Kevin Biesbrock
Modified: 2011-04-30 01:16 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Kevin Biesbrock 2009-05-13 15:33:16 UTC
The internal wiki link to a file using the optional second parameter does not yield expected results.

I do not currently see a bug listed in the bugzilla reports, assuming I was searching properly: tried, for example, "File", "File:", "Links", "Internal Links", "File Links", "Internal File", etc.  I read through a lot of bugs but nothing seemed to immediately address this particular issue.

Start with facts I know:
*General internal link usage:
**[[MyWikiPage]] //=> MyWikiPage
**[[MyWikiPage|My Page]] //=> My Page
**[[Media:MyMediaFile.png]] //=> Media:MyMediaFile.png
**[[Media:MyMediaFile.png|My File]] //=> My File

Anything from that list would produce an anchor and display what's shown after the comment.

My concern is with the internal File: link.  Now, I understand the File link is a loaded feature; with the additional ability to size an image for display, position, etc.  I feel WM bugs out when the link does not link to a displayable file (i.e., an image).  As an example:
*Internal File: links:
**[[File:MyWikiFile.pdf]] //=> File:MyWikiFile.pdf
**[[File:MyWikiFile.pdf|My File]] //=> File:MyWikiFile.pdf

In the second example, I feel (to remain consistent with other internal links) the anchor display text should be "My File" instead of "File:MyWikiFile.pdf".

I have to assume that since this is a rendering issue that it's all server side processing, so I don't think that operating system and browser matter.  But just in case, XP Pro IE7.
Comment 1 Kevin Biesbrock 2009-05-13 15:51:36 UTC
It's not specific to red links.

But I like your title a lot better, thank you :)
Comment 2 Alexandre Emsenhuber [IAlex] 2010-02-01 20:21:04 UTC
*** Bug 22344 has been marked as a duplicate of this bug. ***
Comment 3 Conrad Irwin 2010-02-01 20:43:46 UTC
Fixed in r61816
Comment 4 Aryeh Gregor (not reading bugmail, please e-mail directly) 2010-02-02 17:40:09 UTC
Why should <nowiki>[[File:Foo|Bar]]</nowiki> with a broken link be consistent with <nowiki>[[Foo|Bar]]</nowiki>, rather than with <nowiki>[[File:Foo|Bar]]</nowiki> with a working link?  I'd expect the latter.
Comment 5 Kevin Biesbrock 2010-02-02 17:47:01 UTC
I don't understand your question.(In reply to comment #4)
> Why should <nowiki>[[File:Foo|Bar]]</nowiki> with a broken link be consistent
> with <nowiki>[[Foo|Bar]]</nowiki>, rather than with
> <nowiki>[[File:Foo|Bar]]</nowiki> with a working link?  I'd expect the latter.
Comment 6 Conrad Irwin 2010-02-03 00:02:02 UTC
(In reply to comment #4)
> Why should <nowiki>[[File:Foo|Bar]]</nowiki> with a broken link be consistent
> with <nowiki>[[Foo|Bar]]</nowiki>, rather than with
> <nowiki>[[File:Foo|Bar]]</nowiki> with a working link?  I'd expect the latter.

It seems better to be consistent with [[Foo|bar]] than not consistent at all. Feel free to create a "broken image" placeholder (I imagine that an image would still be fine in place of audio/video/whatever) which would indicate "broken, click here to fix" just as the current red-link does. (This would have the main advantage of making the brokenness of [[File:bloop|thumb|caption]] similar to that of [[File:bloop|right|caption]])
Comment 7 Kevin Biesbrock 2010-02-03 13:24:45 UTC
I guess that's why I don't understand your comment.  The default behavior of a [[Foo|bar]] link is to display a red "bar" which brings you to a "Foo" link.  That's why this issue was raised.  To be consistent a link of [[File:Foo|Bar]] should show "Bar" with a link to "Foo".
Comment 8 Aryeh Gregor (not reading bugmail, please e-mail directly) 2010-02-03 14:49:04 UTC
I was confused, I thought this had to do with images that didn't exist rather than files that couldn't be embedded.  Never mind me.
Comment 9 Kevin Biesbrock 2010-02-03 14:58:13 UTC
It does have to do with files that don't exist.  I guess with images that don't exist, displaying an image placeholder is a good alternative.  But file names can get pretty long, so I see having that "alt name" in there with a red link would be beneficial.
(In reply to comment #8)
> I was confused, I thought this had to do with images that didn't exist rather
> than files that couldn't be embedded.  Never mind me.
Comment 10 Aryeh Gregor (not reading bugmail, please e-mail directly) 2010-02-03 21:36:48 UTC
For files that don't exist, shouldn't we match the convention for templates that don't exist?  {{nonexistent}} becomes a redlink [[Template:Nonexistent]].

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links