- last update
over 1 year ago 2,159 pass - last update
over 1 year ago 2,158 pass, 1 fail - 🇸🇰Slovakia poker10
The patch looks good, thanks!
I am adding a test for this patch and uploading a test-only patch to see the failure (the patch itself is unchanged, except the minor tweak of the comment). I suppose that this should not be a problem in D10, because the D10 code is fetching the width and height from the
$image
here: https://git.drupalcode.org/project/drupal/-/blob/11.x/core/modules/file/file.module#L313D7 is fetching these information from the
$info
variable populated in very first lines and then not updated after the resize.I would say we should mention this in a change record, because even though it is a bug, the patch is changing the current behavior and the image upload will now fail if it cannot be resized to match the minimal dimensions.
- last update
over 1 year ago 2,154 pass, 1 fail - last update
over 1 year ago 2,119 pass, 1 fail - last update
over 1 year ago 2,155 pass - last update
over 1 year ago run-tests.sh exception - last update
over 1 year ago 2,159 pass - last update
over 1 year ago 2,159 pass - last update
over 1 year ago run-tests.sh exception - last update
over 1 year ago 2,159 pass - last update
over 1 year ago 2,159 pass - last update
over 1 year ago 2,159 pass - last update
over 1 year ago 2,120 pass The last submitted patch, 7: 2180877-7_test-only.patch, failed testing. View results →
- last update
over 1 year ago 2,120 pass - last update
over 1 year ago 2,159 pass - Status changed to Fixed
about 1 year ago 11:36am 5 December 2023 - 🇬🇧United Kingdom mcdruid 🇬🇧🇪🇺
Thanks - adding the test made this easy to commit.
Still needs the CR.
Is this a problem in D10?
- 🇸🇰Slovakia poker10
I think this should not be a problem in D10, as the code here is fetching the width and height from the
$image
here: https://git.drupalcode.org/project/drupal/-/blob/11.x/core/modules/file/..., instead of fetching from outdated array as in D7.I found an issue which is discussing the differences between D7 and D10: #2922667-5: Image fields minimum dimension restrictions don't apply equally in D7 and D8 → . I think that the D10 issue should be Won't fix, because the D10 behavior seems to be correct, as
$minimum_dimensions
and$maximum_dimensions
should be considered as hard limits and it should not be possible to get a resulting image which is smaller than$minimum_dimensions
.I have drafted a CR here: https://www.drupal.org/node/3406291 →
Automatically closed - issue fixed for 2 weeks with no activity.
- Status changed to Fixed
12 months ago 9:10am 4 January 2024 - 🇨🇭Switzerland steva1982
Hi,
after having updated Drupal core to 7.99 version, I have this problem:- I want to upload an image and my requirements are "Images must be at least 2880x1620 pixels. Images larger than 2880x1620 pixels will be resized."
- I select an image with dimensions like 2880x1920
- two different messages appear (see the image)
With an other website with Drupal 7.98, the image is uploaded.
Am I doing something wrong?
Thanks.Ste
- 🇸🇰Slovakia poker10
Thanks for reporting this. Can you please create a new issue with your description + image? It seems like it would be ideal if only one message is displayed, to not confuse users. You can post the link to the follow-up issue also here. Thanks!
- 🇨🇭Switzerland steva1982
Hi @poker10, I agree.
But, maybe, I understand the problem:
- my requirements require a 2880x1620 pixels image
- i want to upload a 2880x1920 pixels image
- Drupal resizes it to have 1620 pixel as height, but its new length will be 2'430 pixels in order to preserve the aspect ratio...too small!
Right?
Thanks again - 🇸🇰Slovakia poker10
Drupal resizes it to have 1620 pixel as height, but its new length will be 2'430 pixels in order to preserve the aspect ratio...too small!
Yes, that is correct. This fix changed the behavior in D7 to align with the D10, as the resulting image should not be smaller than minimal dimensions, even if auto-resized.