Project

General

Profile

Actions

Bug #96554

open

ImageManipulation eval required does not work

Added by Nikita Hovratov over 2 years ago. Updated 5 months ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2022-01-16
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
12
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:
Stabilization Sprint

Description

The ImageManipulationElement can have eval with required set to enforce a selected aspect ratio.
This does not work anymore (or rather has never worked in any LTS version), probably due to further refactorings in v8 to enable multiple cropping variants.


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Story #75880: Add art direction capabilities to BEClosed2017-02-23

Actions
Related to TYPO3 Core - Bug #77813: TCA type ImageManipulation can't be set required Closed2016-09-02

Actions
Actions #1

Updated by Nikita Hovratov over 2 years ago

  • Related to Story #75880: Add art direction capabilities to BE added
Actions #2

Updated by Nikita Hovratov over 2 years ago

  • Related to Bug #77813: TCA type ImageManipulation can't be set required added
Actions #3

Updated by Benni Mack 11 months ago

  • Sprint Focus set to Stabilization Sprint
Actions #4

Updated by Marcin Sągol 5 months ago

I was working on this issue trying to make the validation work but a bit different that it is handled at them moment.

We can set through TCA filed of type imageManipulation as required and it is handled now but for this type of filed won’t work. TYPO3 validator basically checks the value of some input to verify if it set and if not, marks it as required. The problem here is that for imageManipulation we will pretty much always have some default value set for such visible input. The second case would be the crop variants. If we have more than one crop variant configured, for example for mobile or desktop, if the field is set as required does it mean that for each variant we should have some crop set?

I decided to try the following approach:

check if imageManipulation field is required

if there is only one crop variant, this variant should be set

if there are more than one variant, check newly introduced required option for each variant and validate only those varaints that are marked as required

So in this approach we will have 2 levels of setting required option for imageManipulation field and its crop variants.

I am at the moment working on it but it is not as easy as it seems :)

Actions

Also available in: Atom PDF