Page MenuHomePhabricator

CX2 - "Cannot read property 'content' of null TypeError" -translation cannot load
Closed, ResolvedPublic

Description

(1) start a new translation (do not publish)
(2) after the translation will be saved, click e.g. on 'All translation' and then load the started translation.
The Console will display the following warning and the translation never finish loading:

TypeError: Cannot read property 'content' of null
    at Object.mw.cx.dm.Translation.static.getSavedSection 
    at Object.<anonymous> 
    at Array.forEach
    at Object.mw.cx.dm.Translation.static.getSourceDom 
    at new MwCxDmTranslation 
    at MwCXInitTranslation

Note1: I do not think that lang is important - but I tried it with en-es

Event Timeline

(For testing after the fix) - there were other different errors when started translation were loaded. I'll need to check older saved translation not only the new ones.

When debug is enabled,

Critical error: Content translation failed to load due to internal error.
GET http://cxserver2.wmflabs.org/v1/page/en/es/Hello_World_(Scandal_album) 404 (Not Found)

And,

[CX] Translation initialization failed.
mw.cx.init.Translation.initializationError @ VM886:1283
Pginer-WMF triaged this task as Medium priority.Apr 26 2018, 8:06 AM
Pginer-WMF moved this task from Backlog to Priority backlog on the Language-2018-Apr-June board.
Pginer-WMF added a subscriber: Pginer-WMF.

Not sure if these are related, but we may want to check T192065 as we investigate this.

Pginer-WMF raised the priority of this task from Medium to High.Apr 26 2018, 8:08 AM

CX1 is fine. No such errors there.

Checked in cx2 - saved translation load without "Cannot read property 'content' of null TypeError" error. Some articles display different errors (see my comment on T193159: Source sections are not saved.