Page MenuHomePhabricator

Suggested Parameters don't respect Template Data paramOrder
Open, Needs TriagePublicBUG REPORT

Description

Steps to Reproduce:

  • Install Template Data and Template Wizard on MW 1.33 (or presumably newer versions also).
  • Add template data, set some data as required and others as suggested
  • Set a paramOrder, save the template, null edit the template (with no edit description given) to ensure the template data shows up.
  • Edit a page via source editor and insert a template, see that all suggested parameters are not sorted according to the set paramOrder but rather, the order in which they are used in the template.

Actual Results:

Suggested parameters (which are shown below required parameters) are sorted in the order in which they are used in the template, rather than in the paramOrder set in the Template Data.

Expected Results:

Suggested parameters should show (in the suggested parameter section, below the required parameters) in the paramOrder specified instead of in the order in which they are used in the template. Template Wizard should be able to respect paramOrder, VE respects it, but Template Wizard in source edit doesn't.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
thiemowmde subscribed.

While doing work for the WMDE-Templates-FocusArea we had a closer look at TemplateWizard as well, even did a bunch of smaller code cleanups, but had to deprioritize it in favor of VisualEditor. We didn't manage to pick this up.

I had a brief look at the code and as of now TemplateWizard doesn't even attempt to use paramOrder. That's more like a missing feature, but could qualify as a bug as well because of the inconsistency with VisualEditor.

To do: Implement the missing feature and make it behave the same as in VisualEditor. That is: Either strictly follow paramOrder, when present. Otherwise strictly follow the order as specified in the params list. Undocumented parameters are alphabetically ordered (case-insensitive), with numeric parameters first.