Last modified: 2014-08-14 15:46:34 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 T18510, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 16510 - Making unreferenced template parameters available or visible
Making unreferenced template parameters available or visible
Status: RESOLVED WORKSFORME
Product: MediaWiki
Classification: Unclassified
Templates (Other open bugs)
unspecified
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-11-30 20:53 UTC by Jorge Stolfi
Modified: 2014-08-14 15:46 UTC (History)
2 users (show)

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


Attachments

Description Jorge Stolfi 2008-11-30 20:53:24 UTC
AFAIK, in the current {{...}} template mechanism, any argument whose key (parameter name) is not explicitly tested by the template's definition is silently ignored.  This behavior makes it nearly impossible for readers of a page to notice errors in template usage.  For example, the following call to Wikipedia's "cite book" template 

:: {{cite book | authro = P. Brown | title = Square Pegs | cover = hard | note = missing | year = 1950}}

yields only

:: <i>Square Pegs</i> (1950).

because all the other arguments are not explicitly used by the template code.

Suggestion: there should be a mechanism to make all unreferenced arguments visible.  One suggestion is to always typeset such arguments, with some glaring markup, at the end of whathever output the template code has produced.  For instance, the template call above coudl produce 

:: <i>Square Pegs</i> (1950) <font color="red"><b>| authro = P. Brown | cover = hard | note = missing </b></font>

Alternatively, there should be a special parameter name, say "LEFTOVERS", whose value at any moment is the concatenation of all parameter-value pairs that have not yet been explicitly referenced by the template code.  Thus, an "idiot-proof" template could finish its processing by fetching the "LEFTOVERS" string and typesetting it (properly un-wikified) with a glaring markup and/or warning message.
Comment 1 Andre Klapper 2014-08-14 15:46:34 UTC
Hi Jorge! Sorry that nobody has taken a look at this report yet and given feedback.

I tried to create a page on en.wikipedia.org with the given example above and the output I get for "Show Preview" nowadays is:

   Square Pegs. 1950. Unknown parameter |note= ignored (help); Unknown parameter |authro= ignored (help); Unknown parameter |cover= ignored (help)

I think this fulfils the request, closing as WORKSFORME.
Please reopen if you disagree or if I misunderstood.

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


Navigation
Links