Project

General

Profile

Actions

Bug #93807

closed

Edit of content elements with image (width=0) not possible

Added by Stefan Froemken about 3 years ago. Updated 7 months ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
Backend User Interface
Target version:
Start date:
2021-03-23
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Hello,

a customer made it to set image dimension in Crop-Editor to 0x0. I have tested it and yes, it's a little bit tricky, but it's really possible to mark an area of 0x0px (see picture).

After saving the content element it is not possible to open Site-Module (for this PID) or open the content element over List-Module. This results in Exception:

Oops, an error occurred!
Width and height of the original image must be greater than zero
More information regarding this error might be available online.

You will find the exception in sysext/core/Classes/Imaging/ImageDimension.php line 76.

PS: It's really hard to debug this Exception. Maybe you see a possibility to add the File UID and the missing width/height of cropping into Exception message. I have searched and queried various DB tables instead...

PPS: missing space in line above ;-)

Stefan


Files

MarkArea0x0InCropArea.png (565 KB) MarkArea0x0InCropArea.png Stefan Froemken, 2021-03-23 10:23

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #99943: Limit image cropper minimal sizeClosed2023-02-13

Actions
Has duplicate TYPO3 Core - Bug #93679: Cropping to 0 (zero) pixels height/width breaks page/content editingClosed2021-03-08

Actions
Actions #1

Updated by Stefan Froemken about 3 years ago

Value from sys_file_reference:

{"default":{"cropArea":{"x":0.78,"y":0.575,"width":0,"height":0},"selectedRatio":"1:1","focusArea":null}}

I have changed that in DB to 64x64 and now I can open the content element.

Actions #2

Updated by Andreas Kienast about 2 years ago

  • Status changed from New to Accepted
Actions #3

Updated by Sybille Peters over 1 year ago

@Stefan Thanks for reporting this. Had a similar problem.

Some more info:

  • name of the field is sys_file_reference.crop

Mine looks like this:

{"default":{"cropArea":{"x":0,"y":0,"width":0,"height":0},"selectedRatio":"NaN","focusArea":null}}

TYPO3 log:

Fri, 16 Sep 2022 17:16:05 +0200 [CRITICAL] request="59ea49227ba55" component="TYPO3.CMS.Core.Error.ProductionExceptionHandler": 
Core: Exception handler (WEB: BE) BadMethodCallException, code #1597310560, file 
/var/www/site/releases/80/public/typo3/sysext/core/Classes/Imaging/ImageDimension.php, 
line 76: Width and height of the image must be greater than zero - 
{"mode":"WEB","application_mode":"BE","exception_class":"BadMethodCallException","exception_code":1597310560,"file":
"/var/www/site/releases/80/public/typo3/sysext/core/Classes/Imaging/ImageDimension.php",
"line":76,
"message":"Width and height of the image must be greater than zero",
"request_url":"https://mysite/typo3/module/web/layout?token=--AnonymizedToken--&id=86055","exception":null,"context":"BE"}

Message in Backend:

503
Oops, an error occurred!
Width and height of the image must be greater than zero

Actions #4

Updated by Chris W about 1 year ago

  • Related to Bug #99943: Limit image cropper minimal size added
Actions #5

Updated by Nikita Hovratov 7 months ago

  • Has duplicate Bug #93679: Cropping to 0 (zero) pixels height/width breaks page/content editing added
Actions #6

Updated by Gerrit Code Review 7 months ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/81111

Actions #7

Updated by Gerrit Code Review 7 months ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/81111

Actions #8

Updated by Gerrit Code Review 7 months ago

Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/81111

Actions #9

Updated by Gerrit Code Review 7 months ago

Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/81132

Actions #10

Updated by Gerrit Code Review 7 months ago

Patch set 1 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/81133

Actions #11

Updated by Nikita Hovratov 7 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF