Page MenuHomePhabricator

VisualEditor: Character duplication in paragraphs following the {{lang-it}} template (and others?)
Closed, ResolvedPublic

Description

If a paragraph contains a template, and VisualEditor is used to insert two characters somewhere after the template, and the second character is deleted with backspace, then the first character will be replaced by another character that is duplicated from several positions before that character.

To reproduce, go to

https://en.wikipedia.org/w/index.php?title=User:AxelBoldt/Sandbox&oldid=618813650&veaction=edit

and change the word "Italian" in the first sentence to "Itaxxlian", then delete the second x. Result: "Itatlian", where the second "t" results from duplication of the first "t".

This is a consequence of the IPA template earlier in the paragraph. The test file also contains a paragraph without template, where the bug does not occur, and a paragraph with a convert template, where the bug does occur.

Wikipedia is at MW 1.24wmf15 and I'm on Windows 7 running Chrome 36.0.1985.125 m.


Version: unspecified
Severity: normal

Details

Reference
bz68733

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 3:27 AM
bzimport set Reference to bz68733.

Yeah, this looks a bit like bug 67862 but less severe.

The effect seems to occur whenever you insert two or more characters in a paragraph after a template and then delete any one of them. The inserted characters do not have to be contiguous. The distance between first inserted character and duplicated character depends on the template.

I believe VE internally uses the length of the unexpanded template where it should use the length of the expanded template.

Change 149920 had a related patch set uploaded by Catrope:
Generate only one pair of snowmen for multi-sibling nodes

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

Change 149920 had a related patch set uploaded by Jforrester:
Generate only one pair of snowmen for multi-sibling nodes

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

Change 149920 merged by jenkins-bot:
Generate only one pair of snowmen for multi-sibling nodes

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

Change 150222 had a related patch set uploaded by Jforrester:
Generate only one pair of snowmen for multi-sibling nodes

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

Change 150222 abandoned by Jforrester:
Generate only one pair of snowmen for multi-sibling nodes

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

Change 150224 had a related patch set uploaded by Jforrester:
Generate only one pair of snowmen for multi-sibling nodes

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

Change 150224 abandoned by Jforrester:
Generate only one pair of snowmen for multi-sibling nodes

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

Change 150224 restored by Jforrester:
Generate only one pair of snowmen for multi-sibling nodes

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

Change 150224 abandoned by Jforrester:
Generate only one pair of snowmen for multi-sibling nodes

Reason:
I give up.

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

Change 150274 had a related patch set uploaded by Catrope:
Generate only one pair of snowmen for multi-sibling nodes

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

Change 150224 restored by Catrope:
Generate only one pair of snowmen for multi-sibling nodes

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

Change 150274 merged by jenkins-bot:
Generate only one pair of snowmen for multi-sibling nodes

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

Change 150224 merged by jenkins-bot:
Generate only one pair of snowmen for multi-sibling nodes

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

  • Bug 68789 has been marked as a duplicate of this bug. ***

Should be now fully fixed in master; deployment to production scheduled for 4 hours' time.