Page MenuHomePhabricator

VisualEditor: [Regression wmf14] In the media dialog, switch to default size button is not changing the size values to default after setting a custom size
Closed, ResolvedPublic

Description

Steps to reproduce:

1.Insert an image in a page
2.Change the size of the image by going to Custom tab
3.Click on "Apply Changes"
4.Now again open the media settings dialog and switch to default tab

Observed Result:
Previously as soon as user switched to default tab, it used to set the text fields to default size, but now its keeping the custom size values.


Version: unspecified
Severity: normal

Details

Reference
bz68000

Event Timeline

bzimport raised the priority of this task from to Normal.Nov 22 2014, 3:30 AM
bzimport set Reference to bz68000.
Ryasmeen created this task.Jul 14 2014, 6:45 PM

Change 147219 had a related patch set uploaded by Mooeypoo:
Make the image model work without a node

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

Change 147219 merged by jenkins-bot:
Make the image model work without a node

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

Verified the fix in test2

This is happening again (!) in Betalabs now

I can't manage to reproduce this in master or in beta labs.

When a new image is inserted, the default behavior is that it has 'default' size. If the user goes to the size widget and just clicks the 'custom' button, it will transform the existing (default) values to custom values (so, the values are the same as the default, but they are literally expressed).

So the values are the same because the user didn't change them, but the difference is whether the image is default or limited in size (despite the fact both sizes are functionally the same)

For instance, for the image "Chef's knife grip.jpg" in beta labs:

Clicking "Custom" size will result in this wikitext:

[[File:Chef's knife grip.jpg|thumb|200x200px]]

Clicking "Default" size will result in this wikitext:

[[File:Chef's knife grip.jpg|thumb]]

That's the expected result. Is something else happening? I can't reproduce a bug.

I cant reproduce it now , the problem was after changing the custom size value, when i was clicking on default tab , it was not changing the size values into default on the size value fields.But now it seems like doing that.

This is again happening in production for this image:https://en.wikipedia.org/wiki/File:Black_sandbox.JPG

Go to this page: https://en.wikipedia.org/w/index.php?title=User:RYasmeen_(WMF)/sandbox&oldid=619869934

Go to the Media settings>Advanced Settings for this image.Switch to default tab.

Observe that, the size values are still showing 22x17 which should be 220x165 as soon as I switch to Default tab.
If you click on Apply Changes and reopen this dialog , still you will see its showing 22x17 instead of 220x165.
If you Save the page and then reopen the page and the media settings dialog only then you will see the size value got changed to 220x165

Change 149217 had a related patch set uploaded by Mooeypoo:
Make the image model persistent

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

Change 149217 merged by jenkins-bot:
Make the image model persistent

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

Still reproducible...

Change 158395 had a related patch set uploaded by Mooeypoo:
Set default dimensions based on original dimensions

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

Change 158395 merged by jenkins-bot:
Set default dimensions based on original dimensions

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

Verified the fix in Betalabs

Verified the fix in test2

Verified the fix in production