Page MenuHomePhabricator

[wmf.20-regression] Uncaught TypeError: $targetTemplate.first(...).cxoverlay is not a function
Closed, ResolvedPublic

Description

The issue exists cx-testing also.

  1. Go to hewiki
  2. Start translating "McLaren" article from English to Hebrew - "McLaren"
  3. Click on the first template (Infobox F1 team) - the following error will be displayed:

After that, nothing can be done with the article - clicking on paragraphs will not start translation.

Uncaught TypeError: $targetTemplate.first(...).cxoverlay is not a function
    at Object.TemplateTool.static.processTemplate (load.php?debug=false&lang=en&modules=ext.cx.pageselector%2Ctools|ext.cx.tools.card%2Ccategories%2Cdictionary%2Cformatter%2Cgallery%2Cimages%2Cinstructions%2Clink%2Clinter%2Cmanager%2Cmt%2Cmtabuse%2Cpoem%2Creference%2Ctemplate|ext.cx.tools.mt.card|ext.cx.tools.template.card%2Ceditor|mw.cx.widgets.TemplateParamOptionWidget&skin=vector&version=1x4ydwz:115)
    at TemplateTool.static.processBlockTemplate (load.php?debug=false&lang=en&modules=ext.cx.pageselector%2Ctools|ext.cx.tools.card%2Ccategories%2Cdictionary%2Cformatter%2Cgallery%2Cimages%2Cinstructions%2Clink%2Clinter%2Cmanager%2Cmt%2Cmtabuse%2Cpoem%2Creference%2Ctemplate|ext.cx.tools.mt.card|ext.cx.tools.template.card%2Ceditor|mw.cx.widgets.TemplateParamOptionWidget&skin=vector&version=1x4ydwz:117)
    at fire (load.php?debug=false&lang=en&modules=jquery%2Cmediawiki|mediawiki.legacy.wikibits&only=scripts&skin=vector&version=14kbqyi:46)
    at Object.fireWith (load.php?debug=false&lang=en&modules=jquery%2Cmediawiki|mediawiki.legacy.wikibits&only=scripts&skin=vector&version=14kbqyi:47)
    at Object.fire (load.php?debug=false&lang=en&modules=jquery%2Cmediawiki|mediawiki.legacy.wikibits&only=scripts&skin=vector&version=14kbqyi:176)
    at HTMLDivElement.sectionClick (load.php?debug=false&lang=en&modules=easy-deflate.core%2Cdeflate|ext.cx.editor%2Cpublish%2Ctranslation|ext.cx.publish.dialog|ext.cx.tours.publish.init|ext.cx.translation.progress|ext.cx.util.selection|mediawiki.api.edit&skin=vector&version=0nhwff0:47)
    at HTMLDivElement.dispatch (load.php?debug=false&lang=en&modules=jquery%2Cmediawiki|mediawiki.legacy.wikibits&only=scripts&skin=vector&version=14kbqyi:69)
    at HTMLDivElement.elemData.handle (load.php?debug=false&lang=en&modules=jquery%2Cmediawiki|mediawiki.legacy.wikibits&only=scripts&skin=vector&version=14kbqyi:66)
    at Object.trigger (load.php?debug=false&lang=en&modules=jquery%2Cmediawiki|mediawiki.legacy.wikibits&only=scripts&skin=vector&version=14kbqyi:112)
    at HTMLDivElement.<anonymous> (load.php?debug=

Note 1: More examples:

  • https://en.wikipedia.org/wiki/Ernie_Davis - template: Infobox NFL biography
  • https://el.wikipedia.org/wiki/Macintosh - template {{ανακατεύθυνση|Mac|το υποεπίπεδο Ελέγχου Πρόσβασης Μέσου στο [[μοντέλο αναφοράς OSI]]|υποεπίπεδο MAC|τις διευθύνσεις κόμβων του υποεπιπέδου MAC|διεύθυνση MAC}}

Note 2: the issue does not happen with all Infobox template - e.g. https://en.wikipedia.org/wiki/Tesla,_Inc. - the template Infobox company won't produce any error.

Event Timeline

Change 410103 had a related patch set uploaded (by Santhosh; owner: Santhosh):
[mediawiki/extensions/ContentTranslation@master] Add ext.cx.widgets.overlay dependency to template editor

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

Change 410103 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] Add ext.cx.widgets.overlay dependency to template editor

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

Change 410105 had a related patch set uploaded (by KartikMistry; owner: Santhosh):
[mediawiki/extensions/ContentTranslation@wmf/1.31.0-wmf.20] Add ext.cx.widgets.overlay dependency to template editor

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

Checked in cx-testing. The error is gone and the page seems to be translatable after clicking on the template. However, there is a persistent "An error occurred while saving the page." and the Console displays:

POST http://cxserver2.wmflabs.org/v1/mt/en/yi/Yandex 403 (Forbidden)
load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=08hbojf:130 
POST http://cx-testing.wmflabs.org/api.php 500 (Internal Server Error)

The translation cannot be saved. The production seems to fine now in terms of saving/loading started translation, although there were some complaints about not being able to load or save previously started translations.

Checked in cx-testing. The error is gone and the page seems to be translatable after clicking on the template. However, there is a persistent "An error occurred while saving the page." and the Console displays:

POST http://cxserver2.wmflabs.org/v1/mt/en/yi/Yandex 403 (Forbidden)
load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=08hbojf:130 
POST http://cx-testing.wmflabs.org/api.php 500 (Internal Server Error)

The translation cannot be saved. The production seems to fine now in terms of saving/loading started translation, although there were some complaints about not being able to load or save previously started translations.

cx-testing instances are not configured to use Yandex. Can you try with Apertium MT?

Can you test again? Ignore Yandex (403) errors as of now. 500 should be fixed (cronjob was stuck and core was not updated to latest).

Change 410105 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@wmf/1.31.0-wmf.20] Add ext.cx.widgets.overlay dependency to template editor

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

Mentioned in SAL (#wikimedia-operations) [2018-02-13T14:25:44Z] <zfilipin@tin> Synchronized php-1.31.0-wmf.20/extensions/ContentTranslation/extension.json: SWAT: [[gerrit:410105|Add ext.cx.widgets.overlay dependency to template editor (T187119)]] (duration: 00m 55s)

Checked in testwiki (wmf.21) - the cases (articles with infobox template) mentioned in the ticket description do not produce error; the content is translatable and the saved started translation is loaded successfully.

@KartikMistry - yes, cx-testing looks fine.