Project

General

Profile

Actions

Bug #103047

closed

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

Added by Gabriel Kaufmann / Typoworx NewMedia 5 months ago. Updated 8 days ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Image Cropping
Target version:
-
Start date:
2024-02-05
Due date:
% Done:

100%

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.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #80214: ImageManipulation: Example for dynamic variable name parts breaks BEClosed2017-03-09

Actions
Actions

Also available in: Atom PDF