Page MenuHomePhabricator

TemplateData addition inserted into source code incorrectly
Closed, ResolvedPublic

Description

Steps I completed to encounter the issue:

Note: Unfortunately, this error occurred when generating TemplateData on a Template which had no TemplateData to begin with, and is therefore unreplicable.

  1. Edit source Template:Infobox earthquake
  2. Clicked Manage TemplateData
  3. Filled parameters, etc., and clicked Apply and Publish changes

Actual results:

  • The <templatedata> with its data was inserted in between {{documentation} and }—see the diff. This, of course, caused an error as can be seen in the diff.

Expected results:

  • Insertion of <templatedata> with its data after {{documentation}}

Additional information

I am unsure if it occurred because my cursor was between {{documentation} and } while in source edit mode before clicking Manage TemplateData, but I highly doubt this is the case as I didn't scroll around and click anywhere before clicking the Manage TemplateData button. However, in either case, this issue shouldn't occur

Event Timeline

Restricted Application added subscribers: Liuxinyu970226, Aklapper. · View Herald Transcript
Waddie96 renamed this task from TemplateData addition to TemplateData addition inserted into source code incorrectly.Nov 28 2019, 7:51 PM
Waddie96 updated the task description. (Show Details)

Change 553521 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/TemplateData@master] templateDataGenerator: Fix off-by-one error when inserting new tag

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

Change 553521 merged by jenkins-bot:
[mediawiki/extensions/TemplateData@master] templateDataGenerator: Fix off-by-one error when inserting new tag

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

ppelberg claimed this task.