(Go: >> BACK << -|- >> HOME <<)

Page MenuHomePhabricator

CX2: Restoring logic broken when article starts with empty paragraph
Closed, ResolvedPublic

Description

Haven't noticed this happening before T204308.

  1. Start translating en:Foreign relations of Barbados to Spanish
  2. Translate section starting with "At the political level"
  3. Save, return to dashboard and load the draft again

Result: Section that is effectively 3rd (because first section is empty) is restored against 1st, empty section.

restoring-fail.png (709×1 px, 55 KB)

There is a separate ticket for some articles starting with an empty paragraph - T200327.

This problem is the most likely cause behind T222882

Event Timeline

@Pginer-WMF, the number of articles starting with an empty paragraph is not insignificant and publishing error described in T222882 will always happen when section is not properly restored like this (might not be the only case when T222882 occurs). Because of this, I think this ticket should be added to Language-Team (Language-2019-April-June) priority backlog. Maybe it's also a high priority ticket.

@Pginer-WMF, the number of articles starting with an empty paragraph is not insignificant and publishing error described in T222882 will always happen when section is not properly restored like this (might not be the only case when T222882 occurs). Because of this, I think this ticket should be added to Language-Team (Language-2019-April-June) priority backlog. Maybe it's also a high priority ticket.

The assessment makes perfect sense. I moved to the current sprint as high priority, being also related to another ticket in this area such as T220790.

Change 509174 had a related patch set uploaded (by Petar.petkovic; owner: Petar.petkovic):
[mediawiki/extensions/ContentTranslation@master] Don't match whitespace as included content while restoring

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

Change 509174 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] Don't match whitespace as included content while restoring

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

Restoring the article of the example shows the translation paragraph in the right position (next to the equivalent in the source) and sentence highlighting works as expected for it:

Screenshot 2019-05-24 at 14.42.18.png (631×804 px, 123 KB)