Search code examples
typo3typo3-7.6.xtypo3-8.xtypo3-9.x

TYPO3 how to modify TCA?


TYPO3 9, but is probably independent of TYPO3 version

I have installed news and eventnews. eventnews adds a field location_simple to the table tx_news_domain_model_news. In the backend this is of type input. I want it to be of type text. Therefore I added a file Configuration/TCA/Overrides/tx_news_domain_model_news.php to my sitepackage:

<?php
if( !defined('TYPO3_MODE') ) {
    die ('Access denied.');
}

// Modify location simple
$GLOBALS['TCA']['tx_news_domain_model_news']['columns']['location_simple']['config']['type'] = 'text';

But this has no effect.

My sitepackage is included at last position, so it should be able to overwrite the TCA of eventnews. What is correct the magic for this?


Solution

  • This worked for me: rename my site package extension so that it has an extension key alphabetically after 'e'.

    It seems as if the files in /Configuration/TCA/Overrides are read alphabetically. In my case I wanted to override eventnews. So my site package extension key had to begin with a letter in [f-z].