Page MenuHomePhabricator

CX2: Cannot load the translation "Manel (grup)" from ca to he
Closed, InvalidPublic

Description

I can't load a translation that I started with CX2 some time ago.

From Catalan to Hebrew. The source title is "Manel (grup)".

I can load another translation that I started.

JavaScript errors:

[CX] Node is not under a section: SPAN after section null. Ignoring. load.php:2308:15
[CX] Node is not under a section: LINK after section mwASc. Ignoring. load.php:2308:15
jQuery.Deferred exception: img is undefined 
ve.dm.MWInlineImageNode.static.toDataElement@https://he.wikipedia.org/w/load.php?debug=false&lang=he&modules=ext.CodeMirror.data%2Clib%2CvisualEditor%7Cext.CodeMirror.mode.mediawiki%7Cext.CodeMirror.visualEditor.init%7Cext.cite.styles%2CvisualEditor%7Cext.cite.visualEditor.core%2Cdata%2Cicons%7Cext.citoid.visualEditor%7Cext.citoid.visualEditor.data%7Cext.disambiguator.visualEditor%7Cext.geshi.visualEditor%7Cext.graph.data%2CvisualEditor%7Cext.kartographer%2CtemplateData%7Cext.kartographer.editing%2Cutil%2CvisualEditor%7Cext.math.styles%2CvisualEditor%7Cext.math.visualEditor.icons%7Cext.score.visualEditor%7Cext.templateData.images%7Cext.templateDataGenerator.data%2CeditPage%2Cui%7Cext.templateDataGenerator.ui.images%7Cext.visualEditor.data%2CdesktopTarget%2Cicons%2Clanguage%2CmoduleIcons%2Cmwalienextension%2Cmwextensions%2Cmwformatting%2Cmwgallery%2Cmwimage%2Cmwlanguage%2Cmwtransclusion%7Cext.visualEditor.mwextensions.desktop%7Cext.visualEditor.mwimage.core%7Cext.wikihiero.visualEditor%…
 undefined

Tested on Firefox 63 (Nightly) and Chrome 67.0.3396.62.

@Petar.petkovic suggested tagging also VisualEditor.

Event Timeline

Amire80 created this task.Aug 14 2018, 11:18 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 14 2018, 11:18 AM
Amire80 renamed this task from CX2" Cannot load the translation "Manel (grup)" from ca to he to CX2: Cannot load the translation "Manel (grup)" from ca to he.Aug 14 2018, 11:18 AM

I was testing T191825 and opened some suggestion for he->en pair (page title is "אילנית לוי"). Content Translation failed to start fresh translation (not from in-progress) because of the error in the same method as reported in this ticket:

jQuery.Deferred exception: Cannot read property 'getAttribute' of undefined TypeError: Cannot read property 'getAttribute' of undefined
    at Object.ve.dm.MWInlineImageNode.static.toDataElement (http://cx2-testing.wmflabs.org/extensions/VisualEditor/modules/ve-mw/dm/nodes/ve.dm.MWInlineImageNode.js?472ed:64:15)
    at VeDmConverter.ve.dm.Converter.createDataElements (http://cx2-testing.wmflabs.org/extensions/VisualEditor/lib/ve/src/dm/ve.dm.Converter.js?f88a1:560:36)
    at VeDmConverter.ve.dm.Converter.getDataFromDomSubtree (http://cx2-testing.wmflabs.org/extensions/VisualEditor/lib/ve/src/dm/ve.dm.Converter.js?f88a1:864:30)
    at VeDmConverter.ve.dm.Converter.getDataFromDomSubtree (http://cx2-testing.wmflabs.org/extensions/VisualEditor/lib/ve/src/dm/ve.dm.Converter.js?f88a1:891:31)
    at VeDmConverter.ve.dm.Converter.getDataFromDomSubtree (http://cx2-testing.wmflabs.org/extensions/VisualEditor/lib/ve/src/dm/ve.dm.Converter.js?f88a1:990:13)
    at VeDmConverter.ve.dm.Converter.getDataFromDomSubtree (http://cx2-testing.wmflabs.org/extensions/VisualEditor/lib/ve/src/dm/ve.dm.Converter.js?f88a1:990:13)
    at VeDmConverter.ve.dm.Converter.getDataFromDomSubtree (http://cx2-testing.wmflabs.org/extensions/VisualEditor/lib/ve/src/dm/ve.dm.Converter.js?f88a1:990:13)
    at VeDmConverter.ve.dm.Converter.getDataFromDomSubtree (http://cx2-testing.wmflabs.org/extensions/VisualEditor/lib/ve/src/dm/ve.dm.Converter.js?f88a1:990:13)
    at VeDmConverter.ve.dm.Converter.getModelFromDom (http://cx2-testing.wmflabs.org/extensions/VisualEditor/lib/ve/src/dm/ve.dm.Converter.js?f88a1:634:14)
    at new MwCxDmTranslation (http://cx2-testing.wmflabs.org/extensions/ContentTranslation/modules/dm/mw.cx.dm.Translation.js?8784a:43:35)

So, I did little investigation and this patch is when the problem started happening.

Deskana added a subscriber: Deskana.

From what I can tell here, this doesn't seem to be related to the visual editor; let me know if I'm wrong.

There seem to be some articles that cause problems when loading. Not sure how related are the underlying issues:

Pginer-WMF triaged this task as Normal priority.Sep 3 2018, 11:35 AM

This looks better now than it looked when I filed the task: The translation in progress is loaded, but the first paragraph is missing, and I'm pretty sure that I did translate it. Also, I see these errors in the console in debug mode:

JQMIGRATE: Migrate is installed with logging active, version 3.0.1 jquery.migrate.js:57:2
[CX] Fetching Source page... load.php:2592:4
[CX] Checking existing translation... load.php:2592:4
[CX] Initializing translation tool system load.php:2592:4
[CX] Fetching existing translation for id: 477408 load.php:2592:4
[CX] Translation initialized successfully load.php:2592:4
[CX] Translation tracker initialized for 41 sections (8 restored) load.php:2592:4
[CX] Mismatch in restored translation has progress. Saved progress was: {"any":0,"human":0,"mt":0,"mtSectionsCount":0} mw.cx.TranslationTracker.js:76:4
mw.cx.TranslationTracker.prototype.init
https://he.wikipedia.org/w/extensions/ContentTranslation/modules/mw.cx.TranslationTracker.js:76:4
mw.cx.TranslationController.prototype.onSurfaceReady
https://he.wikipedia.org/w/extensions/ContentTranslation/modules/mw.cx.TranslationController.js:558:2
oo.EventEmitter.prototype.emit
https://he.wikipedia.org/w/resources/lib/oojs/oojs.jquery.js:824:5
ve.init.mw.Target.prototype.surfaceReady
https://he.wikipedia.org/w/extensions/VisualEditor/modules/ve-mw/init/ve.init.mw.Target.js:227:2
ve.init.mw.CXTarget.prototype.surfaceReady
https://he.wikipedia.org/w/extensions/ContentTranslation/modules/ve-cx/init/ve.init.mw.CXTarget.js:340:2
ve.init.mw.CXTarget.prototype.setTranslation
https://he.wikipedia.org/w/extensions/ContentTranslation/modules/ve-cx/init/ve.init.mw.CXTarget.js:245:2
mw.cx.init.Translation.prototype.init/<
https://he.wikipedia.org/w/extensions/ContentTranslation/modules/mw.cx.init.Translation.js:95:3
mightThrow
https://he.wikipedia.org/w/resources/lib/jquery/jquery.js:3534:21
resolve/</process<
https://he.wikipedia.org/w/resources/lib/jquery/jquery.js:3602:12
(Async: setTimeout handler) resolve/<
https://he.wikipedia.org/w/resources/lib/jquery/jquery.js:3640:9
fire
https://he.wikipedia.org/w/resources/lib/jquery/jquery.js:3268:11
fireWith
https://he.wikipedia.org/w/resources/lib/jquery/jquery.js:3398:7
fire
https://he.wikipedia.org/w/resources/lib/jquery/jquery.js:3406:5
fire
https://he.wikipedia.org/w/resources/lib/jquery/jquery.js:3268:11
fireWith
https://he.wikipedia.org/w/resources/lib/jquery/jquery.js:3398:7
updateFunc/<
https://he.wikipedia.org/w/resources/lib/jquery/jquery.js:3781:7
fire
https://he.wikipedia.org/w/resources/lib/jquery/jquery.js:3268:11
fireWith
https://he.wikipedia.org/w/resources/lib/jquery/jquery.js:3398:7
Deferred/</deferred[tuple[0]]
https://he.wikipedia.org/w/resources/lib/jquery/jquery.js:3736:36
mw.loader.using/<
https://he.wikipedia.org/w/resources/src/mediawiki.base/mediawiki.base.js:633:4
doPropagation
https://he.wikipedia.org/w/load.php:959:10
(Async: requestIdleCallback handler) requestPropagation
https://he.wikipedia.org/w/load.php:998:5
setAndPropagate
https://he.wikipedia.org/w/load.php:1019:6
markModuleReady
https://he.wikipedia.org/w/load.php:1322:7
nestedAddScript
https://he.wikipedia.org/w/load.php:1329:8
nestedAddScript/<
https://he.wikipedia.org/w/load.php:1334:8
queueModuleScript/</<
https://he.wikipedia.org/w/load.php:1179:7
addScript/script.onerror
https://he.wikipedia.org/w/load.php:1150:7
(Async: EventHandlerNonNull) addScript
https://he.wikipedia.org/w/load.php:1144:5
queueModuleScript/<
https://he.wikipedia.org/w/load.php:1174:6
queueModuleScript/</<
https://he.wikipedia.org/w/load.php:1182:8
addScript/script.onerror
https://he.wikipedia.org/w/load.php:1150:7
(Async: EventHandlerNonNull) addScript
https://he.wikipedia.org/w/load.php:1144:5
queueModuleScript/<
https://he.wikipedia.org/w/load.php:1174:6
queueModuleScript/</<
https://he.wikipedia.org/w/load.php:1182:8
addScript/script.onerror
https://he.wikipedia.org/w/load.php:1150:7
(Async: EventHandlerNonNull) addScript
https://he.wikipedia.org/w/load.php:1144:5
queueModuleScript/<
https://he.wikipedia.org/w/load.php:1174:6
queueModuleScript/</<
https://he.wikipedia.org/w/load.php:1182:8
addScript/script.onerror
https://he.wikipedia.org/w/load.php:1150:7
(Async: EventHandlerNonNull) addScript
https://he.wikipedia.org/w/load.php:1144:5
queueModuleScript/<
https://he.wikipedia.org/w/load.php:1174:6
queueModuleScript/</<
https://he.wikipedia.org/w/load.php:1182:8
addScript/script.onerror
https://he.wikipedia.org/w/load.php:1150:7
(Async: EventHandlerNonNull) addScript
https://he.wikipedia.org/w/load.php:1144:5
queueModuleScript/<
https://he.wikipedia.org/w/load.php:1174:6
queueModuleScript/</<
https://he.wikipedia.org/w/load.php:1182:8
addScript/script.onerror
https://he.wikipedia.org/w/load.php:1150:7
(Async: EventHandlerNonNull) addScript
https://he.wikipedia.org/w/load.php:1144:5
queueModuleScript/<
https://he.wikipedia.org/w/load.php:1174:6
[CX] Restored translation has progress: {"any":0.1951219512195122,"human":0,"mt":0.1951219512195122,"mtSectionsCount":8,"translatedSectionsCount":8}

I was testing T191825 and opened some suggestion for he->en pair (page title is "אילנית לוי"). Content Translation failed to start fresh translation (not from in-progress) because of the error in the same method as reported in this ticket.

This error is gone as well.

I still can't load this article, but I see a different error now:

Error: Attempting to set unmodified MT without an MT provider load.php:2443:116
mw.cx.dm.SectionState.prototype.setUnmodifiedMT
https://he.wikipedia.org/w/load.php:2443:116
mw.cx.TranslationTracker.prototype.processSectionChange
https://he.wikipedia.org/w/load.php:2434:645
mw.cx.TranslationTracker.prototype.processChangeQueue
https://he.wikipedia.org/w/load.php:2433:366
mw.cx.TranslationTracker.prototype.getTranslationProgress
https://he.wikipedia.org/w/load.php:2438:500
mw.cx.TranslationTracker.prototype.init
https://he.wikipedia.org/w/load.php:2432:850
mw.cx.TranslationController.prototype.onSurfaceReady
https://he.wikipedia.org/w/load.php:2427:283
oo.EventEmitter.prototype.emit
https://he.wikipedia.org/w/load.php:195:479
ve.init.mw.Target.prototype.surfaceReady
https://he.wikipedia.org/w/load.php:1694:303
ve.init.mw.CXTarget.prototype.surfaceReady
https://he.wikipedia.org/w/load.php:2581:965
<anonymous> self-hosted:972:17

Just a wild guess: may it be related to T207913 ?

Amire80 added a comment.EditedDec 28 2018, 5:36 PM

This still happens.

It fails at modules/dm/mw.cx.dm.SectionState.js if this.currentMTProvider is undefined:

mw.cx.dm.SectionState.prototype.setUnmodifiedMT = function ( html ) {
	if ( !this.currentMTProvider ) {
		throw new Error( 'Attempting to set unmodified MT without an MT provider' );
	}
	this.unmodifiedMT[ this.currentMTProvider ] = {
		html: html,
		text: $( html ).text(),
		saved: false
	};
};

Can the code do something other than throw an error and stop loading the section content?

Can the code do something other than throw an error and stop loading the section content?

I strongly advise against that. The reason these kind of errors are added is for us to quickly become aware if our assumptions are not met. If they don't, we know that there is a bigger issue to investigate and fix. It is counterproductive to try to paper over these errors.

trace:

Error: Attempting to set unmodified MT without an MT provider mw.cx.dm.SectionState.js:64:9
    setUnmodifiedMT https://he.wikipedia.org/w/extensions/ContentTranslation/modules/dm/mw.cx.dm.SectionState.js?f89ad:64
    processSectionChange https://he.wikipedia.org/w/extensions/ContentTranslation/modules/mw.cx.TranslationTracker.js?23419:290
    processChangeQueue https://he.wikipedia.org/w/extensions/ContentTranslation/modules/mw.cx.TranslationTracker.js?23419:240
    getTranslationProgress https://he.wikipedia.org/w/extensions/ContentTranslation/modules/mw.cx.TranslationTracker.js?23419:431
    init https://he.wikipedia.org/w/extensions/ContentTranslation/modules/mw.cx.TranslationTracker.js?23419:168
    onSurfaceReady https://he.wikipedia.org/w/extensions/ContentTranslation/modules/mw.cx.TranslationController.js?c1561:658
    emit jQuery
    surfaceReady https://he.wikipedia.org/w/extensions/VisualEditor/modules/ve-mw/init/ve.init.mw.Target.js?c83d8:232
    surfaceReady https://he.wikipedia.org/w/extensions/ContentTranslation/modules/ve-cx/init/ve.init.mw.CXTarget.js?8b914:371
    <anonymous> self-hosted:982
Amire80 closed this task as Invalid.Fri, Jul 19, 12:13 PM

Too old. I'll reopen if something like this happens again.