Page MenuHomePhabricator

"[CX] Error in adapting template. missing data-mw" when translating template
Closed, ResolvedPublic

Description

(1) On cawiki (wmf.13) I start a new translation from Russian to Catalan (https://ca.wikipedia.org/wiki/Special:ContentTranslation?page=%D0%94%D0%B5%D0%BD%D1%8C+%D0%B2%D1%8B%D0%B1%D0%BE%D1%80%D0%BE%D0%B2+%28%D1%84%D0%B8%D0%BB%D1%8C%D0%BC%29&from=ru&to=ca&targettitle=%D1%82%D0%B5%D1%81%D1%82+4)

(2) Translating French to Catalan film template also produce the same error, e.g.
https://ca.wikipedia.org/wiki/Special:ContentTranslation?page=Lancelot+du+Lac+%28film%29&from=fr&to=ca&targettitle=Test6

Clicking on the template (equivalent to Infobox film template) produces "[CX] Error in adapting template. missing data-mw" Console error. I checked several enwiki Infobox film templates - no Console errors were displayed.
(3) Another case - testwiki (wmf.26). Translating the article "Saison 2 de Miraculous, les aventures de Ladybug et Chat Noir" from French to Chinese. The article consists entirely of templates, so the translating those templates will produce the Console error: "[CX] Error in adapting template. missing data-mw" and also the misalignment of paragraphs:

Screen Shot 2018-03-21 at 12.10.20 PM.png (382×927 px, 51 KB)

Screen Shot 2018-03-21 at 12.12.25 PM.png (500×944 px, 85 KB)

Event Timeline

I couldn't reproduce error for ru->ca and fr->ca. However, do you see tool card while clicking on the infobox? (not related, but can be other bug).

The following steps make the issue reproducible for me every single time:

  1. On cawiki (wmf.13), click on 'New translation'. Enable the Console.
  2. In the New translation popup, select languages From: français To: català
  3. Search for 'Lancelot du Lac' and click on the suggestion 'Lancelot du Lac (film)' (cause it's the infoobox film template that produces the Console error).
  4. Enter any name 'To:' text box.
  5. On the translation page, click on the template and the Console will display "[CX] Error in adapting template. missing data-mw"
    Screen Shot 2017-08-11 at 8.17.00 AM.png (652×1 px, 179 KB)
Pginer-WMF claimed this task.
Pginer-WMF subscribed.

The template editor this ticket refers to won't be available in version 2 of Content Translation. So these issues are expected to disappear with it.