Last modified: 2014-03-28 10:15:20 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 T34657, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 32657 - SemanticMediaWiki: ol/ul and map print formats: Inconsistent template arguments
SemanticMediaWiki: ol/ul and map print formats: Inconsistent template arguments
Status: RESOLVED WORKSFORME
Product: MediaWiki extensions
Classification: Unclassified
SemanticMaps (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Jeroen De Dauw
: patch, patch-need-review
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-26 14:08 UTC by Van de Bugger
Modified: 2014-03-28 10:15 UTC (History)
2 users (show)

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


Attachments
Implementation of the named args. (3.88 KB, patch)
2011-11-26 20:55 UTC, Van de Bugger
Details

Description Van de Bugger 2011-11-26 14:08:35 UTC
Actual problem in SemanticMaps, but decision should be made on SemanticMediaWiki level; so I am setting `Component' to `SemanticMediaWiki'. Later we can change it to `SemanticMaps'.

> {{ #ask: ...
> | mainlabel = -
> | ?Waypoint id
> | ?Location no      
> | ?Location title   
> | ?Coordinates
> | ?Description
> | format     = ol (or `ul' or `template')
> | template   = test
> }}

Template `test' receives arguments:

1 = Waypoint id
2 = Location no
3 = Location title
4 = Coordinates
5 = Description

If I change format to `map', template `test' receives arguments:

1 = Location no
2 = Location title
3 = Description

This makes switching between different type of representation quite hard. I strongly believe template should receive the exactly same list of positional arguments regardless of used format. I know that `map' printer handles Coordinates and passes to template two named arguments `latitude' and `longitude' -- that's completely ok; but I do not see reason for changing positional arguments.

If you agree with idea that template should receive the same list of positional arguments regardless of format, I will try to prepare a patch.
Comment 1 Jeroen De Dauw 2011-11-26 16:26:01 UTC
Changing this would break compat. I think having named params instead if a better way to go.
Comment 2 Van de Bugger 2011-11-26 20:52:07 UTC
> Changing this would break compat.

I knew it.

To my taste it is better to fix and document it, rather than maintain undocumented behaviour. But you decide.
Comment 3 Van de Bugger 2011-11-26 20:55:44 UTC
Created attachment 9562 [details]
Implementation of the named args.

Initial implementation of the named args.

There is still work to do. Named args in `ol'/`ul'/`template' formats depends on printout statement: `?Property' causes argument to be a link, while `?Property#' causes argument to be plain text. In `map' format, argument always plain text, which is not good. It should depend on printout to behave similar to other formats.
Comment 4 Jeroen De Dauw 2011-11-26 22:08:20 UTC
> `?Property#' causes argument to be plain text

This is behavior I'm actually not really familiar with. I do suspect that it is not applied consistently at all, and might only be implemented correctly in the list printers.
Comment 5 Jeroen De Dauw 2014-03-28 10:15:20 UTC
If this till occurs, please refile at

https://github.com/SemanticMediaWiki/SemanticMaps/issues

or

https://github.com/SemanticMediaWiki/SemanticMediaWiki/issues

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


Navigation
Links