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 03/01/21, 07:44

  2. S P changed TYPO3 Version 9 10 10/20/21, 06:24

  3. 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 12/17/24, 10:26

    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
                        }
                    }
                }
            }
        }
    }
  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 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 12/17/24, 10:42

  5. 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 12/17/24, 10:43

  6. S P commented and changed TYPO3 Version 12 13 12/19/24, 09:34

    Bug still in v13.

  7. S P commented and changed TYPO3 Version 13 14 06/11/26, 07:10

    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.

  8. Gerrit Code Review pushed patch set 1 for main to change 96816 status New Under Review 10/18/26, 13:46

  9. Gerrit Code Review pushed patch set 2 for main to change 96816 10/23/26, 05:17

  10. Gerrit Code Review pushed patch set 1 for 14.3 to change 97501 11/10/26, 08:01

  11. Benni Mack commented and changed status Under Review Resolved done 0 % 100 % 11/10/26, 08:05

    Applied in changeset commit:2dbaf53cb3a6293609f549097e536ba0e6cf8228.