Project

General

Profile

Actions

Bug #93679

closed

Cropping to 0 (zero) pixels height/width breaks page/content editing

Added by Mathias Brodala almost 3 years ago. Updated 6 months ago.

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

0%

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

Description

It is possible to store an image cropping configuration of 0 (zero) pixels in width or height. For this an editor simply needs to reduce the cropping frame to 0 in width or height. After saving an error shows up:

Width and height of the image must be greater than zero

(See https://github.com/TYPO3/TYPO3.CMS/blob/10.4/typo3/sysext/core/Classes/Imaging/ImageDimension.php#L76)

Unless the crop field of the affected sys_file_reference record is cleared/fixed manually in the database, viewing the page in the Page module or editing the affected record in the List module is impossible due to this error.

A few options to fix this:

  1. Require a minimum of 1x1 Pixel for cropping
  2. Display error and disable Accept in the Image manipulation wizard
  3. Handle a width/height of 0 Pixel more gratuitously in ImageDimension.

Related issues 3 (0 open3 closed)

Related to TYPO3 Core - Bug #92014: Move SVG image processing into an own file processorClosed2020-08-15

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

Actions
Is duplicate of TYPO3 Core - Bug #93807: Edit of content elements with image (width=0) not possibleResolved2021-03-23

Actions
Actions #1

Updated by Mathias Brodala almost 3 years ago

  • Related to Bug #92014: Move SVG image processing into an own file processor added
Actions #2

Updated by Mathias Brodala almost 3 years ago

  • Is Regression set to Yes
Actions #3

Updated by Mathias Brodala almost 3 years ago

This is evidently a regression caused by #92014: in TYPO3v9 the same steps will not lead to a broken editing experience. Instead the content element is saved and can be edited just fine, even though the following is in sys_file_reference.crop:

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

Updated by Chris Müller about 1 year ago

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

Updated by Nikita Hovratov 6 months ago

  • Is duplicate of Bug #93807: Edit of content elements with image (width=0) not possible added
Actions #6

Updated by Nikita Hovratov 6 months ago

  • Status changed from New to Closed

Closing in favor of #93807.

Actions

Also available in: Atom PDF