Bug #103047
Updated by Garvin Hicking 5 months ago
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: <pre><code class="php"> @ '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 ], ], ], ], ], ] ], ], ], ], </code></pre> @ 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.