Page MenuHomePhabricator

CX2: Cannot edit videos
Closed, ResolvedPublic

Description

Videos cannot be edited in CX2. Switching to "Use source text" does not help, you just get the original text that is not editable.

Example from en:Spinor:


For comparison, CX1 allows editing the caption below video:

Details

Related Gerrit Patches:
mediawiki/services/cxserver : masterlinreardoc: Support video content parsing
mediawiki/extensions/ContentTranslation : masterFix inheritance of CX nodes

Event Timeline

Esanders renamed this task from CX2: Cannot edit caption below the video to CX2: Cannot edit videos.Jul 26 2018, 7:24 PM
Esanders updated the task description. (Show Details)

Two issues:

  1. In the client, cxFigure isn't inheriting properly from mwBlockImage.
  2. On the server, the empty <span> around the <video> is getting stripped, and so violating the DOM spec: https://www.mediawiki.org/wiki/Specs/HTML/1.7.0#Audio/Video

Change 448112 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/ContentTranslation@master] Fix inheritance of CX nodes

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

The above patch fixes the client issue. You probably want to fix the server issue and merge that first.

santhosh claimed this task.Jul 27 2018, 7:26 AM

Change 448412 had a related patch set uploaded (by Santhosh; owner: Santhosh):
[mediawiki/services/cxserver@master] linreardoc: Support video content parsing

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

Change 448112 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] Fix inheritance of CX nodes

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

Merged patch, that was meant for fix inheritance of nodes, now causes following error, while trying to load en:Spinor in CX2:

jQuery.Deferred exception: Cannot read property 'getAttribute' of undefined TypeError: Cannot read property 'getAttribute' of undefined
    at Object.ve.dm.MWBlockImageNode.static.toDataElement (http://cx2-testing.wmflabs.org/extensions/VisualEditor/modules/ve-mw/dm/nodes/ve.dm.MWBlockImageNode.js?dcb55:83:14)
    at Object.ve.dm.CXBlockImageNode.static.toDataElement (http://cx2-testing.wmflabs.org/extensions/ContentTranslation/modules/ve-cx/dm/ve.dm.CXBlockImageNode.js?4a683:49:67)
    at VeDmConverter.ve.dm.Converter.createDataElements (http://cx2-testing.wmflabs.org/extensions/VisualEditor/lib/ve/src/dm/ve.dm.Converter.js?24f36:560:36)
    at VeDmConverter.ve.dm.Converter.getDataFromDomSubtree (http://cx2-testing.wmflabs.org/extensions/VisualEditor/lib/ve/src/dm/ve.dm.Converter.js?24f36:864:30)
    at VeDmConverter.ve.dm.Converter.getDataFromDomSubtree (http://cx2-testing.wmflabs.org/extensions/VisualEditor/lib/ve/src/dm/ve.dm.Converter.js?24f36:990:13)
    at VeDmConverter.ve.dm.Converter.getDataFromDomSubtree (http://cx2-testing.wmflabs.org/extensions/VisualEditor/lib/ve/src/dm/ve.dm.Converter.js?24f36:990:13)
    at VeDmConverter.ve.dm.Converter.getModelFromDom (http://cx2-testing.wmflabs.org/extensions/VisualEditor/lib/ve/src/dm/ve.dm.Converter.js?24f36:634:14)
    at new MwCxDmTranslation (http://cx2-testing.wmflabs.org/extensions/ContentTranslation/modules/dm/mw.cx.dm.Translation.js?8784a:43:35)
    at MwCXInitTranslation.<anonymous> (http://cx2-testing.wmflabs.org/extensions/ContentTranslation/modules/mw.cx.init.Translation.js?36335:84:27)
    at mightThrow (http://cx2-testing.wmflabs.org/load.php?debug=true&lang=en&modules=jquery%7Cmediawiki.base&only=scripts&skin=vector&version=069i1tc:3583:29) undefined

Yes, "You probably want to fix the server issue and merge that first." :)

Yes, "You probably want to fix the server issue and merge that first." :)

Somehow I forgot about that comment after reading it and testing the patch later :)

cxserver patch and 448112 work nicely and users can edit videos again. However, that is true only when you start the translation from scratch. If you try opening your in-progress translation, that was started before 448112 and 448412, you'll get the same error from my last comment and in-progress translation will never load, losing user's work.

We need to support already started translations too.

Change 448412 merged by jenkins-bot:
[mediawiki/services/cxserver@master] linreardoc: Support video content parsing

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

Not moving to QA as the problem with already started translations is yet to be resolved.

Not moving to QA as the problem with already started translations is yet to be resolved.

I think we can move to QA. Given that version 2 is presented as an experimental version (of a beta feature), and the issue affects only translations started with the video element, I think it is not worth it to make backwards compatibility efforts for the few translations that may have been started in that context. Seems more practical to spend these efforts in areas with more impact.

Etonkovidova closed this task as Resolved.Aug 2 2018, 3:58 AM
Etonkovidova added a subscriber: Etonkovidova.

The video can be edited:

Restricted Application added a project: User-Ryasmeen. · View Herald TranscriptAug 2 2018, 3:58 AM

Mentioned in SAL (#wikimedia-operations) [2018-08-08T06:17:16Z] <kartik@deploy1001> Finished deploy [cxserver/deploy@6a0cab1]: Update cxserver to 951fdba (T199308, T199512, T199320, T200665, T200453, T106437) (duration: 03m 32s)