Page MenuHomePhabricator

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



Steps to reproduce:

1.Go to this page:

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




Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 3:22 AM
bzimport set Reference to bz65239.
Ryasmeen created this task.May 12 2014, 8:06 PM

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

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

Verified the fix in Betalabs

Verified the fix in test2

Verified the fix in production