Page MenuHomePhabricator

CX2: untranslatable Stub templates displayed in ContentTranslation
Closed, ResolvedPublic

Description

  1. Start translate 'Cotterill Clough Nature Reserve` from en to ca in cx2.
  2. At the end of the article two templates will be displayed:

Screen Shot 2018-07-26 at 5.00.07 PM.png (574×1 px, 145 KB)

{{GreaterManchester-geo-stub}}
{{England-SSSI-stub}}
  1. Click to try to translate them - the Console error will be displayed:
Uncaught TypeError: Cannot read property 'length' of null
    at Function.mw.cx.TranslationTracker.calculateSectionTranslationProgress (<anonymous>:511:647)
    at MwCXTranslationTracker.mw.cx.TranslationTracker.updateSectionProgress (<anonymous>:511:143)
    at MwCXTranslationTracker.mw.cx.TranslationTracker.processSectionChange (<anonymous>:510:436)
    at MwCXTranslationTracker.mw.cx.TranslationTracker.processChangeQueue (<anonymous>:509:17)
    at later (load.php?debug=false&lang=en&modules=ext.visualEditor.core|oojs-ui-core&skin=vector&version=0cs7duy:806)

Note: the same translation in cx1 will not display those stub templates.

Event Timeline

Pginer-WMF triaged this task as Medium priority.Aug 1 2018, 1:30 PM
Pginer-WMF moved this task from Needs Triage to CX2 on the ContentTranslation board.

The js issue is fixed as a side effect of https://gerrit.wikimedia.org/r/c/mediawiki/extensions/ContentTranslation/+/449500 but the issue of showing those stub templates reamins.

They might be candidates to remove from source content using our blacklisting mechanism at cxserver

Petar.petkovic moved this task from Backlog to QA on the Language-2018-July-September board.
Petar.petkovic subscribed.

Patch that blacklisted *-stub templates was merged without tagging this ticket.
I found this ticket only after giving +2 to the patch.

I suppose this change has not been deployed to production yet, because I am still seeing this issue?

Change 453353 had a related patch set uploaded (by Nikerabbit; owner: Nikerabbit):
[mediawiki/extensions/ContentTranslation@master] mw.cx.TranslationTracker: don't throw errors on only whitespace sections

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

Change 453353 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] mw.cx.TranslationTracker: don't throw errors on only whitespace sections

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

The issue has been fixed - the problematic templates are gone:

Screen Shot 2018-08-21 at 4.35.33 PM.png (619×1 px, 146 KB)