Last modified: 2010-05-15 16:03:44 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 15307 - extensions are parsed before template variable substitution
extensions are parsed before template variable substitution
Status: RESOLVED DUPLICATE of bug 2257
Product: MediaWiki
Classification: Unclassified
Templates (Other open bugs)
1.13.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-08-25 19:33 UTC by Leo
Modified: 2010-05-15 16:03 UTC (History)
0 users

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


Attachments

Description Leo 2008-08-25 19:33:14 UTC
It seems there is a parse order bug either in the extension code or in the template processor.

I discovered this while trying to pass arguments to a template containing google map extension code.

I wanted to say:

<googlemap version="0.9" lat={{{lat|"47.1160849"}}} lon="-88.588851" type="map" zoom="15" selector="no" scale="yes" overview=yes controls="large">

But but no substitution worked.

I even tried making the google maps start tag be the default argument to a template parameter.

{{{foo|<googlemap version="0.9" lat="47.1160849" lon="-88.588851" type="map" zoom="15" selector="no" scale="yes" overview=yes controls="large">}}}

The wiki page here is displayed as:

{{{foo
[followed by the map]

This indicates that the google tags are processed first and gobble up the closing }}} of the template parameters.

This is clearly a parse order bug as the template parameters should be processed and replaced prior to any other processing on the page.


So, okay - I think maybe I am misunderstanding the way code is processed in the wiki.
But then I try to make a template containing an image map using Tim Starling's extension.

At first I try to pass a parameter to change the width of the image, but it doesn't work, so I try to change the alt text for the image, 

Template:
<imagemap>
Image:bhk.jpg|{{{1}}}
rect 13 5 112 58   [[centennial]]
desc bottom-left
</imagemap>

Page:
{{Map|Alt Text}}

which results in the following html code:

<img alt="{{{1}}}" src="/images/Bhk.jpg" width="1048" height="797" border="0" usemap="#ImageMap_1"/>

Which just seems wrong. I feel like the template parameters should never show up in the html output.
Again, it appears the template variables are substituted after extension code has been parsed out.
Comment 1 Brion Vibber 2008-08-25 19:37:25 UTC

*** This bug has been marked as a duplicate of bug 2257 ***

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


Navigation
Links