Issue Bug Resolved

#93615It is not possible to alter the default cropVariants without copy-pasting them first, trying to do so leads to an uncaught exception

S P 03/01/21, 07:40 updated 11/10/26, 08:05

Description

No matter if via TSconfig or via TCA, if you just try to override the default crop varaints (here as Configuration/page.tsconfig example)

TCEFORM {
    sys_file_reference {
        crop {
            config {
                cropVariants {
                    default {
                        selectedRatio = 16:9
                    }
                }
            }
        }
    }
}

Then the Backend throws an exception. This is because the default fallback configuration is not loaded if any custom crop configuration is present:

https://docs.typo3.org/m/typo3/reference-tca/9.5/en-us/ColumnsConfig/Type/ImageManipulation.html#cropvariants

> Above configuration is a fallback if no other more specific configuration has been given.

But I want to alter this exact default configuration without having to copy-paste it first, like any other TCA-setting can be overwritten.

The example here is via TSconfig, but if using overrideChildTca it behaves the same.

Why doesn’t sys_file_reference.crop ship this fallback directly via TCA, but is instead loaded dynamically on runtime (and thus not overridable, forcing people to ugly copy-paste it first)?

Reviews 2

History 811

  1. S P changed subject It is not possible to alter the default cropVariants without copy-pastign them first It is not possible to alter the default cropVariants without copy-pasting them first <span data-processor="relativetime" data-value="2021-03-01T07:44:20+00:00" > 03/01/21, 07:44 </span>

  2. S P commented and changed subject It is not possible to alter the default cropVariants without copy-pasting them first It is not possible to alter the default cropVariants without copy-pasting them first, trying to do so leads to an ancaught exception description TYPO3 Version 10 12 <span data-processor="relativetime" data-value="2024-12-17T10:26:30+00:00" > 12/17/24, 10:26 </span>

    For example, in a purely empty TYPO3 12 just adding the following page.tsconfig makes file references (tt_content.image for example) crash with

    Uncaught TYPO3 Exception: #1620147893: Crop variants configuration default contains no allowed aspect ratios

    TCEFORM {
        sys_file_reference {
            crop {
                config {
                    cropVariants {
                        default {
                            selectedRatio = 16:9
                        }
                    }
                }
            }
        }
    }
  3. S P changed subject It is not possible to alter the default cropVariants without copy-pasting them first, trying to do so leads to an ancaught exception It is not possible to alter the default cropVariants without copy-pasting them first, trying to do so leads to an auncaught exception <span data-processor="relativetime" data-value="2024-12-17T10:42:59+00:00" > 12/17/24, 10:42 </span>

  4. S P changed subject It is not possible to alter the default cropVariants without copy-pasting them first, trying to do so leads to an auncaught exception It is not possible to alter the default cropVariants without copy-pasting them first, trying to do so leads to an uncaught exception <span data-processor="relativetime" data-value="2024-12-17T10:43:05+00:00" > 12/17/24, 10:43 </span>

  5. S P commented and changed TYPO3 Version 13 14 <span data-processor="relativetime" data-value="2026-06-11T07:10:26+00:00" > 06/11/26, 07:10 </span>

    Still present in v14. In the new slide-in panel you don’t even get an exception message, just nothing happens. The 500-response is just discarded now. Making this bug even more obscure.

  6. Benni Mack commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2026-11-10T08:05:10+00:00" > 11/10/26, 08:05 </span>

    Applied in changeset commit:2dbaf53cb3a6293609f549097e536ba0e6cf8228.