Page MenuHomePhabricator

Changing parameter doesn't adjust the paramOrder list, leaving it out of sync
Closed, ResolvedPublic

Description

Change a param key name, and save - you now have a different name in the paramOrder - so on subsequent edits, your param no longer appears in the list. The model is basically in an invalid state.

Event Timeline

For TemplateDataGenerator this can be (or already is) handled.

For wikitext, we can emit save errors, but transforming it automatically isn't an option.

I suggest to close this in favour of T127958 (which obsoletes this bug) and T138219.

Jdforrester-WMF changed the task status from Open to Stalled.Aug 23 2016, 7:27 PM
Jdforrester-WMF subscribed.

This seems to now be fixed in master?

This seems to now be fixed in master?

TemplateDataGenerator began handling it on master a few hours before @Krinkle's comment above, see T138800.
But as for whether it's fixed... see the rest of his comment.

Krinkle claimed this task.

I think I misunderstood Ed's comment. I assumed the intention was to automatically update the list to match the same order (which is what the UI does right now, but source edits don't/can't).

However, think the more low-level problem was that it was possible to save an edit that led to an invalid model. That is, there would be entries in paramOrder that don't exist in the params object. That has been fixed at some point:

Screen Shot 2019-02-18 at 13.46.03.png (950×1,164 px, 55 KB)

Closing as such given it now can't be broken by wikitext edits anymore. For the better UX, see T127958.