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

bzimport set Reference to bz60502.
Ryasmeen created this task.Via LegacyJan 27 2014, 10:33 PM
Ryasmeen added a comment.Via ConduitJan 27 2014, 10:37 PM

Created attachment 14386
Screenshot

Attached:

Catrope added a comment.Via ConduitJan 27 2014, 10:44 PM

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.

gerritbot added a comment.Via ConduitJan 28 2014, 3:23 AM

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

gerritbot added a comment.Via ConduitJan 28 2014, 7:12 PM

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

Ryasmeen added a comment.Via ConduitJan 30 2014, 11:16 PM

Verified the fix in test2 and mw.org

Ryasmeen added a comment.Via ConduitJan 31 2014, 9:49 PM
  • Bug 60699 has been marked as a duplicate of this bug. ***
gerritbot added a comment.Via ConduitJan 31 2014, 11:10 PM

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

gerritbot added a comment.Via ConduitFeb 3 2014, 11:37 PM

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

Add Comment