Last modified: 2008-09-13 06:02:08 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 8835 - ImageMap does not accept links in the image caption
ImageMap does not accept links in the image caption
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
ImageMap (Other open bugs)
unspecified
PC Windows XP
: Normal normal with 7 votes (vote)
: ---
Assigned To: Tim Starling
: patch, patch-need-review
: 8924 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-01-30 20:35 UTC by Daniel U. Thibault
Modified: 2008-09-13 06:02 UTC (History)
4 users (show)

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


Attachments
parser makeImage patch.txt (1.62 KB, patch)
2007-05-11 17:45 UTC, Sean J
Details

Description Daniel U. Thibault 2007-01-30 20:35:40 UTC
Any links in the image's caption text become as if marked <nowiki>. For now,
on emust strip links from ImageMap captions. For example:<br/>
<imagemap>
Image:EightTNOs.png|thumb|275px|The largest [[Trans-Neptunian object]]s that
prompted the IAU's decision.
rect 646 1714 2142 1994 [[Earth|The Earth]]

desc none
</imagemap>
Comment 1 Brion Vibber 2007-02-02 23:35:00 UTC
The problem is that Parser::makeImage happens halfway through the multi-pass
parsing normally, but those earlier passes haven't been run on ImageMap's text.

So, no links, bold/italics, etc.

Not sure what's the best way around this. Full subparse of the options text?
Comment 2 Raimond Spekking 2007-04-17 09:56:38 UTC
*** Bug 8924 has been marked as a duplicate of this bug. ***
Comment 3 Michael Daly 2007-05-02 23:03:14 UTC
Is there a default line in the real example (not shown in the text above)?

I've noticed that the caption works if there is no default line and is
overridden by the default otherwise.

E.g. default [[Default page]] will override the caption on the first line's options.
Comment 4 Daniel U. Thibault 2007-05-10 00:54:32 UTC
What do you mean by "default line"?
Comment 5 Michael Daly 2007-05-10 04:31:00 UTC
As per input documentation:

  default
      This gives the default link, where no other regions are specified. 

The format is as I gave in the example:

    default [[Default page]]

Clicking on the image where no area is defined with a shape will go to the
default page.
Comment 6 Daniel U. Thibault 2007-05-10 13:17:19 UTC
Ah, you mean the default ''parameter''.

No, specifying the default parameter changes nothing to the bug: the caption is
still unparsed. On Wikipedia, anyway. Have you had experience otherwise?
Comment 7 Daniel U. Thibault 2007-05-10 14:01:23 UTC
Additional: The bug also means the image map will not accept parameters when
embedded within a Template. It is thus impossible to build a template wrapper
around an imagemap that would allow various defaults (image size, alignment,
caption, etc.) to be passed in as parameters (named or default-numbered, doesn't
matter). For example:

<imagemap>
Image:EightTNOs.png|thumb|275px|{{{caption|The largest [[Trans-Neptunian
object]]s that prompted the IAU's decision}}}
rect 646 1714 2142 1994 [[Earth|The Earth]]
desc none
</imagemap>
Comment 8 Sean J 2007-05-11 17:45:20 UTC
Created attachment 3622 [details]
parser makeImage patch.txt

Normal image captions are handled in two places: 
- wiki text rendering is done in internalParse() with the doAllQuotes() call 
- links are handled recursively in replaceInternalLinks()
By moving/adding these calls into makeImage(), the caption rendering is done
everytime that makeImage is used. 

This doesn't allow for wiki tables or headings(which do work in normal image
links), for that the imagemap extension would have to be reworked.

Produces same result in ParserTests as r22112.

This solves the wiki text and links issues but template arguments cannot be
used without fixing bug 2257 first.
Comment 9 Arturo 2008-02-23 12:00:57 UTC
Hi! i managed to resolve part of this bug with {{#tag}}, bypassing:
Here's a working copy of imagemap
{{#tag:imagemap|
Image:It-{{{1}}}.png{{!}}40px{{!}}description
default [[{{{1}}}]]
desc none
}}
Comment 10 Siebrand Mazeland 2008-08-17 22:13:23 UTC
Assigned to extension developer
Comment 11 Alex Z. 2008-09-13 06:02:08 UTC
This was fixed in r40684 / r40685.

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


Navigation
Links