Page MenuHomePhabricator

VisualEditor: Opening a Cite>Website/Book/Newspaper/Journal while selecting an image does not open the citation dialog
Closed, ResolvedPublic

Description

Screenshot

Steps to reproduce:

1.Select an image
2.Click on Cite> Website/Book/Newspaper/Journal

Observed Result:
It throws an error: Uncaught TypeError: Object #<VeDmMWBlockImageNode> has no method 'getInternalItem'

and VE gets stuck at this point, as you cannot close that dialog anymore

Test Environment: http://en.wikipedia.beta.wmflabs.org/
Browser: FF 25
OS: MAC OS X 10. 8. 5
Page:http://en.wikipedia.beta.wmflabs.org/wiki/Pageoffseterror?veaction=edit


Version: unspecified
Severity: normal

Attached:

Details

Reference
bz63452

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 3:08 AM
bzimport set Reference to bz63452.
Ryasmeen created this task.Apr 2 2014, 10:52 PM

It happens if you select a gallery/Math formula/template/reflist and then try to open any of the cite options

Should be resolved by I34a5a2da576247f4046da45f742bccc3cec22c5a

Specifically, the error is caused by calling getInternalItem on the node without checking if it's a ve.dm.MWReferenceNode. This patchset introduces an instanceof check.

Change 123124 had a related patch set uploaded by Catrope:
Correctly insert or update citations based on template option

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

Change 123124 merged by jenkins-bot:
Correctly insert or update citations based on template option

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

After the fix, now the Cite dialogs does not open at all after selecting any image or any other mentioned nodes.
Therefore reopening the bug and changing the title of the bug .

Works for me now, both locally and on beta labs.