Page MenuHomePhabricator

VisualEditor: Trying to open gallery inspector when an image or reference is selected causes JS error
Closed, ResolvedPublic

Description

Steps to reproduce:

1.Open a page with VE
2.Select an image
3.Go to Insert>Gallery

Observed Result:
An error appears in the console "Uncaught TypeError: Cannot read property 'body' of undefined"

After that the Media Settings option does not appear on any other image .Also the reference dialog option does not show up when you select a reference note.

Test Environment: http://en.wikipedia.beta.wmflabs.org/
Browser: Chrome Version 26.0.1410.65 & FF 25
OS: MAC OS X 10. 8. 5


Version: unspecified
Severity: normal

Details

Reference
bz60502

Event Timeline

bzimport raised the priority of this task from to Unbreak Now!.Nov 22 2014, 3:07 AM
bzimport set Reference to bz60502.

Created attachment 14386
Screenshot

Attached:

Screen_Shot_2014-01-27_at_2.36.53_PM.png (603×1 px, 348 KB)

There's no validation going on in MWExtensionInspector at all, so it's happy to try and inspect references or images or anything that's inspectable, even if it can't be inspected by the inspector you tried to open.

Change 109832 had a related patch set uploaded by Catrope:
Don't throw JS errors when opening MWExtensionInspector on the wrong node type

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

Change 109832 merged by jenkins-bot:
Don't throw JS errors when opening MWExtensionInspector on the wrong node type

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

Verified the fix in test2 and mw.org

  • Bug 60699 has been marked as a duplicate of this bug. ***

Change 110652 had a related patch set uploaded by Jforrester:
Don't throw JS errors when opening MWExtensionInspector on the wrong node type

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

Change 110652 merged by jenkins-bot:
Don't throw JS errors when opening MWExtensionInspector on the wrong node type

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