Page MenuHomePhabricator

VisualEditor: [Regression pre-wmf5] TypeError: originalDimensions is undefined appears while saving the edit on an image
Closed, ResolvedPublic

Description

Screenshot

Steps to reproduce:

1.Go to this page:http://en.wikipedia.beta.wmflabs.org/wiki/12thmayff?veaction=edit

2.Select the first image on the page: Dau_ho_thoi_Ho.png

3.Make any edit on the image's caption field

4.Click on "Apply Changes"

Observed Result:

The Media Settings dialog does not get closed , the edit does not get saved

The following error appears in the console:

TypeError: originalDimensions is undefined


Version: unspecified
Severity: normal

Attached:

Screen_Shot_2014-05-12_at_12.26.33_PM.png (768×1 px, 266 KB)

Details

Reference
bz65239

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 3:22 AM
bzimport set Reference to bz65239.

The following steps ensure reproducing the issue for all images:

1.Insert a new image in a page and save the page
2.Reopen the page and go to the Advanced Settings of the image
3.Click on custom tab and click on Apply Changes
4.Save the page
5.Reopen the page and again go the Advanced Settings of the image
6.Click on Default tab and click on Apply changes

You will see the error and get stuck inside the media settings dialog box

For Chrome the error appearing is a bit different:Uncaught TypeError: Cannot read property 'width' of undefined

Change 133123 had a related patch set uploaded by Mooeypoo:
Make sure originalDimensions are available before use

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

Change 133123 merged by jenkins-bot:
Make sure originalDimensions are available before use

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

Verified the fix in production