Last modified: 2014-11-02 02:13:38 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 T71964, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 69964 - No error given for duplicate template parameters
No error given for duplicate template parameters
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Templates (Other open bugs)
1.25-git
All All
: Normal enhancement (vote)
: ---
Assigned To: Jackmcbarn
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-08-24 17:47 UTC by andrussm
Modified: 2014-11-02 02:13 UTC (History)
3 users (show)

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


Attachments

Description andrussm 2014-08-24 17:47:48 UTC
There are various ways that a Cite template could end up with the same parameter name coded more than once. I don't know of a legitimate reason for doing this, so as far as I know any such duplication would be unintentional and would produce undesirable results. 

I have tested multiple first= and last= parameters, and the software ignores all but the last occurrence and does not throw an error. I may be wrong, but I assume that the same would be true for all Cite parameters. 

I have been cleaning up refs, starting each ref by copy-and-pasting an empty Cite template from Notepad. This contained "|first= |last=", which I filled in with the author's name. If there were multiple authors, I first copy-and-pasted the "|first= |last=" string to duplicate it as many times as needed. Then, due to ADD, I sometimes neglected to change the added parameter names to first2, last2, etc. 

I don't know of a legitimate reason for duplicate parameter names, so as far as I know any such duplication would be unintentional and would yield undesirable results. So it would seem that principles of good software design would suggest throwing an error. Yes, I was negligent in forgetting to change the parameter names, but people will make mistakes and the software could tell them that they did rather than allowing the error to remain.
Comment 1 Gerrit Notification Bot 2014-08-24 17:52:43 UTC
Change 136123 had a related patch set uploaded by Jackmcbarn:
Add a tracking category for duplicate arguments

https://gerrit.wikimedia.org/r/136123
Comment 2 andrussm 2014-08-24 18:05:42 UTC
I guess this system isn't intended for us by mere mortals like me, since I don't understand the response. I do understand what a tracking category is, and my test case is only in one hidden category: Wikipedia pages with incorrect protection templates. I don't think that's it. So I'll assume that everything that can be done has been done or will be done. Thank you.
Comment 3 Jackmcbarn 2014-08-24 18:10:22 UTC
The category isn't there because my change isn't active yet. Someone needs to review and accept it. One to two weeks after that happens, it will become active on Wikipedia.
Comment 4 andrussm 2014-08-24 18:11:19 UTC
Very good, I'll watch for that. Thank you again.
Comment 5 Andre Klapper 2014-08-24 18:49:58 UTC
This ticket gets closed as "resolved fixed" once the corresponding code change is *merged* in the Gerrit/Git code review system (see link in comment 1).
Comment 6 Gerrit Notification Bot 2014-10-16 04:45:32 UTC
Change 136123 merged by jenkins-bot:
Add a tracking category for duplicate arguments

https://gerrit.wikimedia.org/r/136123
Comment 7 Jackmcbarn 2014-10-16 04:49:53 UTC
This change will become active on all WMF wikis on October 23rd.
Comment 8 Leonard Wallentin 2014-11-01 23:16:54 UTC
There are a few templates on svwp that uses the `|=` hack to draw ”check boxes” and ”input boxes” in templates. Those page are now filling up this category, because of duplicate empty string parameters. See an usage example here: https://sv.wikipedia.org/wiki/Mall:Kina-h%C3%A4rad#Exempel
Comment 9 Jackmcbarn 2014-11-02 02:13:38 UTC
IMO, the fix for that is to stop doing that, but if you really think it's an issue, open a separate bug about it.

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


Navigation
Links