Page MenuHomePhabricator

TemplateData: renaming parameters causes error
Closed, ResolvedPublic1 Story Points

Description

  1. Open TemplateData editor.
  2. Create a new property, giving it a name. ("Foo")
  3. Immediately click the property to edit it.
  4. Change its name, ("FooBar").
  5. Observe error being thrown after your second keystroke while renaming:
ext.templateDataGenerator.data.js?3292a:719 Uncaught TypeError: Cannot set property 'name' of undefined mw.TemplateData.Model.setParamProperty @ ext.templateDataGenerator.data.js?3292a:719
mw.TemplateData.Dialog.onParamPropertyInputChange @ ext.templateDataGenerator.ui.tdDialog.js?a0610:465
oo.EventEmitter.emit @ oojs.jquery.js?d40c1:775

Event Timeline

DLynch created this task.Aug 13 2016, 12:17 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 13 2016, 12:17 AM

Change 304594 had a related patch set uploaded (by DLynch):
Dialog must listen for changes to the param names

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

I tested and, although the patch fixes this bug, it doesn't fix the other one. I'll look into the other later.

Change 304594 merged by jenkins-bot:
Dialog must listen for changes to the param names

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

Jdforrester-WMF closed this task as Resolved.Aug 15 2016, 4:48 PM
Jdforrester-WMF triaged this task as High priority.
Jdforrester-WMF set the point value for this task to 1.
Jdforrester-WMF moved this task from To Triage to TR0: Interrupt on the VisualEditor board.