Project

General

Profile

Actions

Bug #103047

open

Crop-Variants with dot in variant-name are not being saved

Added by Gabriel Kaufmann / Typoworx NewMedia 4 months ago. Updated 4 months ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Backend API
Target version:
-
Start date:
2024-02-05
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
12
PHP Version:
8.2
Tags:
backend, crop-variant
Complexity:
Is Regression:
Sprint Focus:

Description

I've recently defined some new crop-variants for a project with custom aspect-ratios like 1:1.4 (775/545),
which looks in TCA-Code for a specific image-relation like this:

'tx_ifmainmetallce_image' => [
'config' => [
'overrideChildTca' => [
'columns' => [
'crop' => [
'config' => [
'cropVariants' => [
'default' => [
'disabled' => true,
],
'teaser-2023' => [
'title' => 'Teaser 2023',
'allowedAspectRatios' => [
'1:1' => [
'title' => '1:1 [545x545]',
'value' => 1
],
'1:1.4' => [
'title' => '1:1.4 [775x545]',
'value' => 775/545
],
],
],
],
],
]
],
],
],
],

While testing the 1:1.4 crop-variant seems to work at first glance (frontend crop-ui) works! But when saving it's lost falling back to the first one (default entry). After I changed the key from '1:1.4' to '1:1,4' it worked.

For some reason a dot in they array identifier-key seems to break the functionality. I think this either should be fixed to make it work more intuitive or if there is any good reason for the dot (".") having a special meaning, both should be documented in crop-variants documenation. I didn't notice any kind of hint on this.

Actions

Also available in: Atom PDF