Page MenuHomePhabricator

Working with references is broken in CX2
Closed, ResolvedPublic

Description

Translate any paragraph with a reference. Clicking on any reference causes following errors:

Uncaught TypeError: Cannot read property 'emit' of null
    at VeCeCXTransclusionInlineNode.ve.ce.CXTransclusionInlineNode.afterRender (ve.ce.CXTransclusionNode.js?4ddeb:91)
    at VeCeCXTransclusionInlineNode.ve.ce.GeneratedContentNode.render (ve.ce.GeneratedContentNode.js?4a56e:225)
    at VeCeCXTransclusionInlineNode.ve.ce.MWTransclusionNode.render (ve.ce.MWTransclusionNode.js?b1cc1:180)
    at VeCeCXTransclusionInlineNode.ve.ce.GeneratedContentNode.doneGenerating (ve.ce.GeneratedContentNode.js?4a56e:354)
    at ve.ce.GeneratedContentNode.js?4a56e:291
    at fire (jquery.js?6a07d:3268)
    at Object.fireWith [as resolveWith] (jquery.js?6a07d:3398)
    at Object.deferred.(/anonymous function) [as resolve] (http://cx2-testing.wmflabs.org/resources/lib/jquery/jquery.js?6a07d:3736:36)
    at VeCeCXTransclusionInlineNode.ve.ce.MWTransclusionNode.onParseSuccess (ve.ce.MWTransclusionNode.js?b1cc1:168)
    at fire (jquery.js?6a07d:3268)

and

Uncaught TypeError: Cannot read property 'element' of null
    at VeCeCXTransclusionInlineNode.ve.ce.View.initialize (ve.ce.View.js?9c8a2:109)
    at VeCeCXTransclusionInlineNode.ve.ce.LeafNode.initialize (ve.ce.LeafNode.js?2240c:45)
    at VeCeCXTransclusionInlineNode.ve.ce.GeneratedContentNode.render (ve.ce.GeneratedContentNode.js?4a56e:220)
    at VeCeCXTransclusionInlineNode.ve.ce.MWTransclusionNode.render (ve.ce.MWTransclusionNode.js?b1cc1:180)
    at VeCeCXTransclusionInlineNode.ve.ce.GeneratedContentNode.doneGenerating (ve.ce.GeneratedContentNode.js?4a56e:354)
    at ve.ce.GeneratedContentNode.js?4a56e:291
    at fire (jquery.js?6a07d:3268)
    at Object.fireWith [as resolveWith] (jquery.js?6a07d:3398)
    at Object.deferred.(/anonymous function) [as resolve] (http://cx2-testing.wmflabs.org/resources/lib/jquery/jquery.js?6a07d:3736:36)
    at VeCeCXTransclusionInlineNode.ve.ce.MWTransclusionNode.onParseSuccess (ve.ce.MWTransclusionNode.js?b1cc1:168)

Card in the tools column is generated using the correct information. However, trying to edit reference using a dialog, by clicking on "Edit" button causes another error:

Uncaught TypeError: Cannot read property 'getModel' of null
    at VeUiMWReferenceDialog.<anonymous> (ve.ui.MWReferenceDialog.js?780b0:425)
    at Process.js:61
    at OO.ui.Process.execute (Process.js:96)
    at VeUiMWReferenceDialog.OO.ui.Window.teardown (Window.js:679)
    at WindowManager.js:527

Because the dialog in which user is supposed to edit references should be overlaying the content and remove the scrollbar, the effect of dialog not showing is just that after clicking "Edit" button we end up with no option to scroll content, and seems with no way out.

Same errors reported in T199512#4607603 and two times in comments of T202165. Also, T205420 explains the cause for one of the errors.

Event Timeline

Petar.petkovic moved this task from Needs Triage to CX2 on the ContentTranslation board.
Petar.petkovic moved this task from Backlog to In Review on the Language-2018-July-September board.

Change 462422 had a related patch set uploaded (by Petar.petkovic; owner: Santhosh):
[mediawiki/extensions/ContentTranslation@master] Fix error in CXTransclusionNode#afterRender method

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

Pginer-WMF triaged this task as High priority.Sep 26 2018, 9:23 AM

Uncaught TypeError: Cannot read property 'element' of null error is reported separately on T205429.

Change 462422 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] Fix error in CXTransclusionNode#afterRender method

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

Change 463446 had a related patch set uploaded (by KartikMistry; owner: Santhosh):
[mediawiki/extensions/ContentTranslation@wmf/1.32.0-wmf.23] Fix error in CXTransclusionNode#afterRender method

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

Change 463446 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@wmf/1.32.0-wmf.23] Fix error in CXTransclusionNode#afterRender method

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

Mentioned in SAL (#wikimedia-operations) [2018-10-01T12:12:54Z] <zfilipin@deploy1001> Synchronized php-1.32.0-wmf.23/extensions/ContentTranslation/: SWAT: [[gerrit:463446|Fix error in CXTransclusionNode#afterRender method (T205521)]] (duration: 00m 59s)

Etonkovidova closed this task as Resolved.EditedOct 2 2018, 4:14 AM

Checked in cx2 (and wmf.23) - references displayed correctly and no Console errors are displayed.

Petar.petkovic removed subscribers: Stashbot, gerritbot.