georgringer / news

TYPO3 Extension news
GNU General Public License v2.0
264 stars 358 forks source link

Overriding sys_category in own extension #2345

Closed derMatze82 closed 8 months ago

derMatze82 commented 8 months ago

I have my own extension in which I override the sorting in the backend via Configuration/TCA/Overrides/sys_category.php e.g. with

$GLOBALS['TCA']['sys_category']['ctrl']['default_sortby'] = 'sorting';

which also works. For the slug generation I would like to make the following customization:

$GLOBALS['TCA']['sys_category']['columns']['slug']['config']['appearance'] = [
    'prefix' => EmptySlugPrefix::class . '->getPrefix'
];

Unfortunately this does not work ((in contrast to Configuration/TCA/Overrides/tx_news_domain_model_tag.php, where the slug customization works perfectly)). In general, no column that has already been extended by the news extension can be overwritten. Is this a Typo3 bug or a bug in the news extension? In the composer.json my own extension is loaded after the news extension.

Environment

derMatze82 commented 8 months ago

Sorry, my fault: Forgot to add the require attribute in the composer.json file of my package. Now the ordering is correct and everything works as expected