FluidTYPO3 / flux

TYPO3 extension Flux: Dynamic Fluid FlexForms
https://fluidtypo3.org
146 stars 212 forks source link

BUG: no tt_content fileds from TCA Overrides after update to 10.0.x and dev #2142

Closed olegkarun closed 10 months ago

olegkarun commented 10 months ago

I have checked that the bug exists in the dev-development branch Yes

I have checked that there are no already open issues or recently closed issues about this bug Yes

Describe the bug myext/Configuration/TCA/Overrides/contenet_ext.php additional fields dispirited after update to any 10.0.x version. Works after downgrade to 9.7.2-9.7.4

Expected behavior Get additional fields with new FLUX version

Additional context TYPO3 11.5.32-33 FLUX 10.0.x + dev

NamelessCoder commented 10 months ago

Override files for Flux-enabled content types need to be in Configuration/TCA/Flux/ - the override files must follow the same approach as a standard TCA override file. Alternatively, you can define a replacement default showitem that gets used as basis for all Flux-enabled content types, by adding to your ext_localconf.php file of your extension (any extension which depends on Flux will work):

    \FluidTYPO3\Flux\Utility\CompatibilityRegistry::register(
        \FluidTYPO3\Flux\Builder\ContentTypeBuilder::DEFAULT_SHOWITEM,
        [
            '10.4.0' => '
            --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:general,
                --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.general;general,
                --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.headers;headers,
                pi_flexform,
            --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.appearance,
                --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.frames;frames,
                --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.appearanceLinks;appearanceLinks,
            --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:language,
                --palette--;;language,
            --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:access,
                --palette--;;hidden,
                --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.access;access,
            --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:categories,
                categories, 
            --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:notes,
                rowDescription'
        ]
    );

Modify the long string as needed. The format is documented on https://docs.typo3.org/m/typo3/reference-tca/main/en-us/Types/Properties/Showitem.html.

The reason for needing different files to make TCA overrides compared to earlier versions is a fundamental change made in TYPO3v12 which makes it impossible to trigger the Flux integration at a point where it would be able to register the necessary configuration and happen before TCA overrides are applied. This has forced Flux to use a separate overrides file location which can be loaded at the right time. Note that the Flux-specific overrides can contain also overrides for non-Flux elements, but should contain only overrides for Flux-specific elements.