Page MenuHomePhabricator

Option to start from scratch results in a scroll jump and "Machine translation failed" error
Closed, ResolvedPublic

Description

When translating Lemonade from English to Finnish, adding the first paragraph and selecting the option to "Start with an empty paragraph" causes the following issues:

  • Scroll jumps to the top of the document.
  • A "Machine translation failed" error is shown to the user.
  • The MT card shows the previous service ("Google" in the example).

The issue is illustrated below:

The Javascript console error is included below:

Uncaught TypeError: Cannot read property 'getChildren' of null
    at MwCXTranslationTracker.mw.cx.TranslationTracker.isExcludedFromValidation (<anonymous>:900:34)
    at MwCXTranslationTracker.mw.cx.TranslationTracker.processValidationQueue (<anonymous>:899:494)
    at VeCeCXSectionNode.OO.EventEmitter.emit (<anonymous>:74:483)
    at HTMLElement.dispatch (load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets|oojs-ui.styles.icons-editing-advanced&skin=vector&version=rudzv:69)
    at HTMLElement.elemData.handle (load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets|oojs-ui.styles.icons-editing-advanced&skin=vector&version=rudzv:65)
    at remove (load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets|oojs-ui.styles.icons-editing-advanced&skin=vector&version=rudzv:77)
    at jQuery.fn.init.detach (load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets|oojs-ui.styles.icons-editing-advanced&skin=vector&version=rudzv:79)
    at VeCeDocumentNode.ve.ce.BranchNode.onSplice (load.php?lang=en&modules=ext.visualEditor.core&skin=vector&version=1utuv:380)
    at VeDmDocumentNode.OO.EventEmitter.emit (<anonymous>:74:483)
    at VeDmDocumentNode.ve.dm.BranchNode.splice (load.php?lang=en&modules=ext.visualEditor.core&skin=vector&version=1utuv:71)

Details

Related Gerrit Patches:
mediawiki/extensions/ContentTranslation : masterAdd more checks for section model being null

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 2 2019, 9:06 AM
Pginer-WMF triaged this task as Medium priority.Oct 2 2019, 9:34 AM

@Doc_James - For your reference related to the report sent from Wikiproject Medicine. Thanks.

Change 543019 had a related patch set uploaded (by Petar.petkovic; owner: Petar.petkovic):
[mediawiki/extensions/ContentTranslation@master] Add more checks for section model being null

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

Change 543019 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] Add more checks for section model being null

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

I tried the same steps from the description and only got Javascript errors being logged in console.
Message "Machine translation failed" was not shown and jump did not happen.

Also tried steps with different articles and language pairs on both production and localhost. @Jpita, @Pginer-WMF can you recheck if jump still happens? I also saw some jumps happening in the past, but I don't know when the last time was.

Also tried steps with different articles and language pairs on both production and localhost. @Jpita, @Pginer-WMF can you recheck if jump still happens? I also saw some jumps happening in the past, but I don't know when the last time was.

The jump does no longer happen for me. I selected different options on the MT card with the viewport at different positions and was not able to reproduce the jump. Before it was very hard not to find it, so I guess it no longer happens. But @Jpita, feel free to do further checks.

Also tried steps with different articles and language pairs on both production and localhost. @Jpita, @Pginer-WMF can you recheck if jump still happens? I also saw some jumps happening in the past, but I don't know when the last time was.

The jump does no longer happen for me. I selected different options on the MT card with the viewport at different positions and was not able to reproduce the jump. Before it was very hard not to find it, so I guess it no longer happens. But @Jpita, feel free to do further checks.

I also did checks using various viewport positions and MT options.

Jpita closed this task as Resolved.Oct 21 2019, 9:07 AM