Page MenuHomePhabricator

Visual diff crashes if you convert an existing paragraph to a blockquote; the otherNode is a VeDmTextNode which doesn't have a .node.type set
Closed, ResolvedPublic1 Estimated Story Points

Description

Steps to reproduce:

  1. Open VE
  2. From the text formatting menu in the toolbar select "Blockquote"
  3. Type something
  4. Go to Save Page dialog
  5. Click on "Review your changes"

Observed Result:
VE crashes with the following error in the console:
Uncaught TypeError: Cannot read property 'type' of undefined

Event Timeline

Ryasmeen created this task.Mar 23 2017, 9:50 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 23 2017, 9:50 PM
Ryasmeen updated the task description. (Show Details)Mar 23 2017, 9:52 PM
Jdforrester-WMF renamed this task from [Regression pre-wmf.18] VE crashes after clicking on "Review your changes" when Block quote is added to Visual diff crashes if you convert an existing paragraph to a blockquote; the otherNode is a VeDmTextNode which doesn't have a .node.type set.Mar 24 2017, 5:14 PM
Jdforrester-WMF triaged this task as High priority.
Jdforrester-WMF set the point value for this task to 1.
Uncaught TypeError: Cannot read property 'type' of undefined
    at ve.DiffTreeNode.isEqual (ve.DiffTreeNode.js?018b1:45)
    at treeDiffer.Differ.getNodeDistance (treeDiffer-dist.js?6a2b5:329)
    at treeDiffer.Differ.findMinimumTransactions (treeDiffer-dist.js?6a2b5:361)
    at treeDiffer.Differ.populateTransactions (treeDiffer-dist.js?6a2b5:297)
    at new treeDiffer.Differ (treeDiffer-dist.js?6a2b5:260)
    at VeDmVisualDiff.ve.dm.VisualDiff.getDocChildDiff (ve.dm.VisualDiff.js?14a93:251)
    at VeDmVisualDiff.ve.dm.VisualDiff.findModifiedDocChildren (ve.dm.VisualDiff.js?14a93:172)
    at VeDmVisualDiff.ve.dm.VisualDiff.getDiff (ve.dm.VisualDiff.js?14a93:102)
    at new VeDmVisualDiff (ve.dm.VisualDiff.js?14a93:33)
    at VeInitMwDesktopArticleTarget.ve.init.mw.ArticleTarget.getVisualDiff (ve.init.mw.ArticleTarget.js?31af9:1174)

Change 344799 had a related patch set uploaded (by Esanders):
[VisualEditor/VisualEditor@master] Fix dm.BlockquoteNode to inherit from ContentBranchNode

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

Change 344799 merged by jenkins-bot:
[VisualEditor/VisualEditor@master] Fix dm.BlockquoteNode to inherit from ContentBranchNode

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

Change 344803 had a related patch set uploaded (by Jforrester):
[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (15ee3e37d)

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

Change 344803 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (495cd7d65)

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

Restricted Application added a project: User-Ryasmeen. · View Herald TranscriptMar 28 2017, 3:50 PM
Ryasmeen moved this task from To be Verified to Verified on the User-Ryasmeen board.