Page MenuHomePhabricator

Parsoid on serialisation should use the `paramOrder` field from TemplateData if available to set the order of parameters in new/edited transclusions
Closed, ResolvedPublic0 Estimated Story Points

Description

Citoid is producing this order (at en.wp):

{{Cite journal
|title = Drugs versus placebo for dysthymia
|url = http://www.ncbi.nlm.nih.gov/pubmed/11034701
|journal =The Cochrane Database of Systematic Reviews
|date = 2000
|issn =1469-493X
|pmid = 11034701
|pages = CD001130
|issue = 4|doi =10.1002/14651858.CD001130
|first = M. S.
|last = Lima
|first2 = J.
|last2= Moncrieff}}

TemplateData puts the authors first. They ought to match.

Event Timeline

Whatamidoing-WMF raised the priority of this task from to Medium.
Whatamidoing-WMF updated the task description. (Show Details)
Whatamidoing-WMF added a project: Citoid.

I don't understand how this is blocked on T64217; the paramOrder field is already available, and won't be changed by that task.

" preferred order of parameters by key" when creating new transclusions was
the key part.

In the extension we create a new transclusion using ve, but we don't change
how it's initially serialised. As you point out in that thread, param order
is already reflected in the *display* but not in the wikitext, which was
what this bug is about. If param order is respected during serialisation,
it would fix this- no?

Jdforrester-WMF renamed this task from Citoid should respect the order of parameters in citation templates that is specified in TemplateData to Parsoid on serialisation should use the `paramOrder` field from TemplateData if available to set the order of parameters in new/edited transclusions.Oct 13 2015, 7:06 PM
Jdforrester-WMF edited projects, added Parsoid; removed Citoid.
Jdforrester-WMF edited a custom field.
Jdforrester-WMF added a subscriber: Krenair.

If param order is respected during serialisation, it would fix this- no?

Yes, that's what this bug is. But it's not Citoid-specific. Re-written to be general.

Change 264043 had a related patch set uploaded (by Subramanya Sastry):
WIP: Fetch and use templatedata

https://gerrit.wikimedia.org/r/264043

Change 264043 merged by jenkins-bot:
Fetch and use templatedata while serializing transclusions

https://gerrit.wikimedia.org/r/264043