Page MenuHomePhabricator

VisualEditor: When an image has a full size which is smaller than the default size, it does not set the default size to the value of full size
Closed, ResolvedPublic

Description

Screenshot

Steps to reproduce:

1.Open a page with VE
2.Add an image which has an full size less than the default size for example: http://en.wikipedia.beta.wmflabs.org/wiki/File:FS_barnstar.png
It has a full size of 111x107 px which is less than the default size 220x212 px

3.Now if you switch to set to custom size , it will show Size values are invalid as it is larger than the full size.

Page:http://en.wikipedia.beta.wmflabs.org/wiki/Betachrome5th?veaction=edit


Version: unspecified
Severity: normal

Attached:

Screen_Shot_2014-03-05_at_4.16.57_PM.png (473×905 px, 50 KB)

Details

Reference
bz62293

Event Timeline

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

Change 117161 had a related patch set uploaded by Mooeypoo:
Enforce width-only default size only on larger images

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

Change 117161 merged by jenkins-bot:
Enforce width-only default size only on larger images

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

I can still reproduce this bug for the same image on that page when I switch from "Set to default size" to "Set Custom Size"

Change 118231 had a related patch set uploaded by Mooeypoo:
Deal with images whose size is smalled than default

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

Change 118231 merged by jenkins-bot:
Deal with images whose size is smalled than default

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

This bug is happening again now in Betalabs and test2 for the image File:Ló_heraldika.png

I can't replicate on master with the same image [[File:Ló_heraldika.png|thumb]]

It appears in the proper size, which is much smaller than the default.

This is still happening:

Getting the error message "Size values are invalid" when I switch to custom from default tab.Also, also the default size is appearing as 220x245 px where as the full size of the image is 71x79 px (smaller than the default size)

Just tested this again with the new MWImageModel, and it seems this bug is fixed.

I tested on both Ló_heraldika.png and FS_barnstar.png with quick changes to the size (as before). Works properly for me in labs.

Provisionally marking as FIXED, then. :-)

Yes, I checked it with those images on Betalabs and looks like it got fixed with https://gerrit.wikimedia.org/r/#/c/120808/

Verified the fix in production