Page MenuHomePhabricator

ContentTranslation: Uncaught TypeError: Cannot read property 'contains' of undefined
Closed, ResolvedPublic

Description

When using ContentTranslation (master), console log throws uncaught TypeError. Seen in local and cx2 (labs) setup.

How to reproduce

  • Go to cx2-testing.wmflabs.org
  • Start an article to translate. Select (en->gl) pair for example (where we've Apertium available).
  • Click on paragraph to translate. Open console. Following error is observerd.

Log

Uncaught TypeError: Cannot read property 'contains' of undefined
    at CXIssueTrackingTool.mw.cx.tools.IssueTrackingTool.getCurrentNodeId
    at CXIssueTrackingTool.mw.cx.tools.IssueTrackingTool.getCurrentPanel
    at CXIssueTrackingTool.mw.cx.tools.IssueTrackingTool.init
    at CXIssueTrackingTool.mw.cx.tools.IssueTrackingTool.showIssues
    at mw.cx.ui.ToolsColumn.showIssues
    at mw.cx.ui.TranslationView.onTranslationIssues
    at MwCxTranslationController.mw.cx.TranslationController.onTranslationIssues
    at MwCxDmTranslation.OO.EventEmitter.emit
    at VeDmCXSectionNode.ve.dm.CXLintableNode.addTranslationIssues
    at MwCXTranslationTracker.mw.cx.TranslationTracker.setMTAbuseWarning

User impact

  • Does not show the issues with the translation (MT percentage limit, page already exists, etc...)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 10 2020, 5:09 AM
KartikMistry updated the task description. (Show Details)Jun 10 2020, 5:11 AM
KartikMistry updated the task description. (Show Details)
Jpita updated the task description. (Show Details)Jun 10 2020, 5:25 AM
KartikMistry triaged this task as High priority.Jun 11 2020, 1:58 AM

This is now happening in 1.35.0-wmf.36 (cawiki/hewiki).

Change 604549 had a related patch set uploaded (by Santhosh; owner: Santhosh):
[mediawiki/extensions/ContentTranslation@master] IssueTrackingTool: Fix js error in getCurrentNodeId method

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

Nikerabbit raised the priority of this task from High to Unbreak Now!.Jun 11 2020, 7:16 AM
Restricted Application added a subscriber: Liuxinyu970226. · View Herald TranscriptJun 11 2020, 7:16 AM

Change 604587 had a related patch set uploaded (by KartikMistry; owner: Santhosh):
[mediawiki/extensions/ContentTranslation@wmf/1.35.0-wmf.36] IssueTrackingTool: Fix js error in getCurrentNodeId method

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

Change 604549 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] IssueTrackingTool: Fix js error in getCurrentNodeId method

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

Jpita added a subscriber: Jpita.

working on cx2.
@KartikMistry let me know when it is deployed so I check in production

Change 604587 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@wmf/1.35.0-wmf.36] IssueTrackingTool: Fix js error in getCurrentNodeId method

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

Mentioned in SAL (#wikimedia-operations) [2020-06-11T11:28:52Z] <kartik@deploy1001> Synchronized php-1.35.0-wmf.36/extensions/ContentTranslation/modules/tools/mw.cx.tools.IssueTrackingTool.js: Backport: [[gerrit|604587|IssueTrackingTool: Fix js error in getCurrentNodeId method (T254965)]] (duration: 01m 07s)

@KartikMistry let me know when it is deployed so I check in production

Deployed in production. You can test in ca/hewiki.

jeena added a subscriber: jeena.Jun 11 2020, 6:06 PM

Hi, can someone confirm whether this is fixed before train deploy? I am not familiar enough with Content Translation to understand the reproduction steps in this task :(

Nikerabbit closed this task as Resolved.Jun 11 2020, 6:20 PM
Nikerabbit added a subscriber: Nikerabbit.

It's fixed.