Page MenuHomePhabricator

Pasting into VE with new Wikitext surface enabled causes error
Closed, ResolvedPublic1 Story Points

Description

Enable the wikitext editor via $wgVisualEditorEnableWikitext = true;

Edit a page, and try to paste data into it.

See this exception:

ve.ui.DataTransferHandlerFactory.js?15814:129 Uncaught TypeError: Cannot read property 'static' of undefined

Related Objects

StatusAssignedTask
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
ResolvedEsanders
OpenNone
OpenNone
ResolvedJules78120
OpenNone
ResolvedDannyH
OpenNone
OpenEsanders
OpenNone
OpenEsanders
ResolvedJdforrester-WMF
ResolvedEsanders

Event Timeline

DLynch created this task.Aug 25 2016, 11:16 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 25 2016, 11:16 PM

This is a bug in ve.ce.MWWikitextSurface where I unconditionally unregister ve.ui.MWWikitextStringTransferHandler. The handler should be available in VE, but not NWE.

The way I did this with the other factories was by create wikitext versions of the factories, but this might be overkill for removing/disabling one item.

But also this reveals that unregister isn't working properly in this case - it needs to be overridden to update all the extra caches DTHFactory creates.

Change 306967 had a related patch set uploaded (by Esanders):
Remove items from DTH factory caches when unregistering

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

Jdforrester-WMF triaged this task as High priority.
Jdforrester-WMF moved this task from To Triage to TR1: Releases on the VisualEditor board.
Jdforrester-WMF set the point value for this task to 1.

Change 306967 merged by jenkins-bot:
Remove items from DTH factory indexes when unregistering

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