Page MenuHomePhabricator

Saved translation fails to load
Closed, ResolvedPublic

Description

I thought this is related to the Error 400 fixed recently, but apparently it's not the same thing (although perhaps related). The bug has been mentioned here a couple of times already (T178748, T154116, but it would be best to try to isolate this issue.

A couple of my translations are lost in some sort of a loading loop. When clicking on a translation (say, Michael D. Coe or Nahuatl, or Caroline Sturdy Colls, all from en to pl), the CT page opens. The text I already translated appears, but it's greyed-out. The three dots on top blink endlessly as if loading the article, but the content flashes only for a second and then gets hidden under a grey overlay. I can still see the text, both the original and the translated text, but can't click it, alter it -- or publish it (the publish button is grey and unclickable as well).

The description above is based on what happens when I try to change/publish/salvage my translation on Michael D. Coe (see T178748), the exact behaviour at times is slightly different. In the case of Caroline Sturdy Colls article the original text blinks for a sec, and then both columns become simply white, nothing visible (I can see the word search and Yandex/don't translate fields, the header and the three blinking dots, but not the text). This case is interesting, as previously I had trouble publishing this article due to Error 400 (reported here). Article on Nahuatl also had this problem before (report here).

Let me know what can I do to help. Screenshots? Screencasts? Debug logs? Just point me in the right direction. Also, my full system specs and Wikipedia specs (as in gadgets and beta features) are posted in T179633.

EDIT/ More reports, possibly on the same issue (in Hebrew, @Amire80 could shed some light on what's written there): here and here

Event Timeline

Console logs will be useful with debug mode enabled. Add &debug=1 at the end of the URL.

@KartikMistry , not sure if I do it properly (is there a way to export the debug log from FF?). Anyway, the console for this link:

Use of "wgNamespaceNumber" is deprecated. Use mw.config instead.  load.php:11386:8
Use of "skin" is deprecated. Use mw.config instead. load.php:11386:8
Use of "document.write" is deprecated. Use jQuery or mw.loader.load instead.  load.php:11386:8
Use of "addOnloadHook" is deprecated. Use jQuery instead.  load.php:11386:8
Use of "importScriptURI" is deprecated. Use mw.loader instead. load.php:11386:8
Use of "addOnloadHook" is deprecated. Use jQuery instead.  load.php:11386:8
jQuery.Deferred exception: wp_sk is not defined @https://pl.wikipedia.org/w/index.php?title=Wikipedysta:Beno/wp_sk.js&action=raw&ctype=text/javascript:4:2
@https://pl.wikipedia.org/w/resources/src/mediawiki.legacy/wikibits.js?98281:30:20
mightThrow@https://pl.wikipedia.org/w/load.php?debug=true&lang=pl&modules=jquery%2Cmediawiki%7Cmediawiki.legacy.wikibits&only=scripts&skin=vector&version=0v61to4:3583:21
resolve/</process<@https://pl.wikipedia.org/w/load.php?debug=true&lang=pl&modules=jquery%2Cmediawiki%7Cmediawiki.legacy.wikibits&only=scripts&skin=vector&version=0v61to4:3651:12
 undefined  load.php:3860:3
JQMIGRATE: jQuery.fn.hover() is deprecated  load.php:10340:4

The console for this link:

Use of "wgNamespaceNumber" is deprecated. Use mw.config instead.  load.php:11386:8
Use of "skin" is deprecated. Use mw.config instead. load.php:11386:8
Use of "document.write" is deprecated. Use jQuery or mw.loader.load instead.  load.php:11386:8
Use of "addOnloadHook" is deprecated. Use jQuery instead.  load.php:11386:8
Use of "importScriptURI" is deprecated. Use mw.loader instead. load.php:11386:8
Use of "addOnloadHook" is deprecated. Use jQuery instead.  load.php:11386:8
jQuery.Deferred exception: wp_sk is not defined @https://pl.wikipedia.org/w/index.php?title=Wikipedysta:Beno/wp_sk.js&action=raw&ctype=text/javascript:4:2
@https://pl.wikipedia.org/w/resources/src/mediawiki.legacy/wikibits.js?98281:30:20
mightThrow@https://pl.wikipedia.org/w/load.php?debug=true&lang=pl&modules=jquery%2Cmediawiki%7Cmediawiki.legacy.wikibits&only=scripts&skin=vector&version=0v61to4:3583:21
resolve/</process<@https://pl.wikipedia.org/w/load.php?debug=true&lang=pl&modules=jquery%2Cmediawiki%7Cmediawiki.legacy.wikibits&only=scripts&skin=vector&version=0v61to4:3651:12
 undefined  load.php:3860:3
JQMIGRATE: jQuery.fn.hover() is deprecated  load.php:10340:4
jQuery.Deferred exception: $content[0] is undefined ContentTranslationStorage.prototype.getContent@https://pl.wikipedia.org/w/extensions/ContentTranslation/modules/translation/ext.cx.translation.storage.js?05e33:43:3
ContentTranslationStorage.prototype.markForSave@https://pl.wikipedia.org/w/extensions/ContentTranslation/modules/translation/ext.cx.translation.storage.js?05e33:282:13
ContentTranslationStorage.prototype.listen/<@https://pl.wikipedia.org/w/extensions/ContentTranslation/modules/translation/ext.cx.translation.storage.js?05e33:78:4
fire@https://pl.wikipedia.org/w/load.php?debug=true&lang=pl&modules=jquery%2Cmediawiki%7Cmediawiki.legacy.wikibits&only=scripts&skin=vector&version=0v61to4:3317:11
fireWith@https://pl.wikipedia.org/w/load.php?debug=true&lang=pl&modules=jquery%2Cmediawiki%7Cmediawiki.legacy.wikibits&only=scripts&skin=vector&version=0v61to4:3447:7
fire@https://pl.wikipedia.org/w/load.php?debug=true&lang=pl&modules=jquery%2Cmediawiki%7Cmediawiki.legacy.wikibits&only=scripts&skin=vector&version=0v61to4:13590:14
TemplateTool.prototype.onUpdate@https://pl.wikipedia.org/w/extensions/ContentTranslation/modules/tools/ext.cx.tools.template.js?67fc9:1099:4
TemplateTool.prototype.markUndaptable@https://pl.wikipedia.org/w/extensions/ContentTranslation/modules/tools/ext.cx.tools.template.js?67fc9:1066:3
TemplateTool.static.processTemplate/<@https://pl.wikipedia.org/w/extensions/ContentTranslation/modules/tools/ext.cx.tools.template.js?67fc9:1159:4
mightThrow@https://pl.wikipedia.org/w/load.php?debug=true&lang=pl&modules=jquery%2Cmediawiki%7Cmediawiki.legacy.wikibits&only=scripts&skin=vector&version=0v61to4:3583:21
resolve/</process<@https://pl.wikipedia.org/w/load.php?debug=true&lang=pl&modules=jquery%2Cmediawiki%7Cmediawiki.legacy.wikibits&only=scripts&skin=vector&version=0v61to4:3651:12
 undefined  load.php:3860:3
jQuery.Deferred exception: this.sourceTemplate.getFirstVisibleFragment(...) is undefined TemplateTool.prototype.replaceTargetTemplate@https://pl.wikipedia.org/w/extensions/ContentTranslation/modules/tools/ext.cx.tools.template.js?67fc9:982:14
TemplateTool.prototype.markUndaptable@https://pl.wikipedia.org/w/extensions/ContentTranslation/modules/tools/ext.cx.tools.template.js?67fc9:1063:4
TemplateTool.static.processTemplate/<@https://pl.wikipedia.org/w/extensions/ContentTranslation/modules/tools/ext.cx.tools.template.js?67fc9:1159:4
mightThrow@https://pl.wikipedia.org/w/load.php?debug=true&lang=pl&modules=jquery%2Cmediawiki%7Cmediawiki.legacy.wikibits&only=scripts&skin=vector&version=0v61to4:3583:21
resolve/</process<@https://pl.wikipedia.org/w/load.php?debug=true&lang=pl&modules=jquery%2Cmediawiki%7Cmediawiki.legacy.wikibits&only=scripts&skin=vector&version=0v61to4:3651:12
 undefined

Is this what you had in mind?

I could able to reproduce this. In case of restored translations, with templates, the templatetool tries to get the data required for the editor. That tool used to show an overlay on top of the particular template - just to avoid any action on it, till the data is available, but in https://gerrit.wikimedia.org/r/#/c/371467/ This overlays behaviour was changed to cover 100% screenwidth and height - Hence affecting the whole translation editor view.

Since CX2 will do all of these adaptation in server, it does not make sense to have a complicated solution in CX1, the quick solution I can think of is retaining the old overlay behaviour using an option passed to the overlay widget from template editor context.

@santhosh , indeed in version=2 there's no overlay, but my saved translation doesn't load either ("Loading saved translation" message on top).

@santhosh , indeed in version=2 there's no overlay, but my saved translation doesn't load either ("Loading saved translation" message on top).

CX2 is not usable at all. That is in active development.

Change 390189 had a related patch set uploaded (by Santhosh; owner: Santhosh):
[mediawiki/extensions/ContentTranslation@master] Bring back the overlay support for a specific screen region

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

Change 390189 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] Bring back the overlay support for a specific screen region

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

(not sure what are those two above, but the article on Michael D. Coe is still hidden behind gray overlay)

Change 390206 had a related patch set uploaded (by KartikMistry; owner: Santhosh):
[mediawiki/extensions/ContentTranslation@wmf/1.31.0-wmf.7] Bring back the overlay support for a specific screen region

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

Change 390206 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@wmf/1.31.0-wmf.7] Bring back the overlay support for a specific screen region

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

Mentioned in SAL (#wikimedia-operations) [2017-11-09T14:30:24Z] <zfilipin@tin> Synchronized php-1.31.0-wmf.7/extensions/ContentTranslation/modules/: SWAT: [[gerrit:390206|Bring back the overlay support for a specific screen region (T179997)]] (duration: 00m 50s)

(not sure what are those two above, but the article on Michael D. Coe is still hidden behind gray overlay)

See if this is working now. Please report any issue related this if not. Thanks!

@KartikMistry , it works! Thank you! At last I can finish all those translations...