Page MenuHomePhabricator

Bad parameter duplication detection in template
Closed, InvalidPublic


In the Portuguese Wiktionary, the template [[Predefiniçã]] is being parsed has having duplicated parameter 24, for instance (among others). Nevertheless, it is only given once. I believe the transitions of numbered vs unnumbered parmeteres is confusing the validation mechanism. It only complains about duplication of numbered parameters.

Event Timeline

Malafaya created this task.Aug 5 2015, 3:30 PM
Malafaya raised the priority of this task from to Needs Triage.
Malafaya updated the task description. (Show Details)
Malafaya added a project: MediaWiki-Templates.
Malafaya added a subscriber: Malafaya.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 5 2015, 3:30 PM
Jackmcbarn closed this task as Invalid.Aug 5 2015, 4:33 PM
Jackmcbarn claimed this task.
Jackmcbarn added a subscriber: Jackmcbarn.

It's the template that's broken, not the duplication detection code. Passing a parameter with a number for a name doesn't cause that number to be skipped. Look at and for an example.

Malafaya reopened this task as Open.EditedAug 6 2015, 9:21 AM

Even if that is the case, there is something off. I gave the example of parameter 24 on purpose. If you count unnumbered parameters, you will see there is less than 24, so it could never be duplicated. Nevertheless, the validation complains about duplication of parameter 24. How come?

Even if your examples seem to support you, I can't verify your statement in that template.

14 = {{{1}}}{{{2а}}}{{#if:{{{ox}}}́}}ли

<!-- futuro -->

[[буду]] {{{1}}}{{{2а}}}{{#if:{{{ox}}}́}}ть

and acording to your rule, that [[буду]] text should appear not in parameter 15 but in parameter 12 (if you count previous unnumbered parameters, there are 11). But in fact, it does appear in position of parameter 15.

Could it be a wiki-dependent behavior?

I will adjust the template soon, but I will leave it for now so you can verify what I'm writing about.

Malafaya closed this task as Invalid.Aug 6 2015, 9:30 AM

Got it. There were some extra pipes at the end of some parameters therefore increasing the number of unnumbered parameters. Thank you for your patience.