i'm trying to upgrade a extension for TYPO3 10.4 which add a custom type to tx_news (Doc).
I did the migration based on this example: Breaking: #87623
Classes/Controller/NewsController.php
return [
\Xyz\Extendnews\Domain\Model\Team::class => [
'tableName' => 'tx_news_domain_model_news',
'recordType' => 3,
],
But wenn I debug the entry in the Fluid-Template the default model is still used.
Did I miss something or does someone have a working example.
Thanks for any help.
Update: I want to create a new type, explained in Georg Ringer´s manual
I have created a small extension, everything works fine with TYPO3 9.5, but not with TYPO3 10.4. DEMO EXT
With TYPO3 10.4 the prototype is not MxnTeam\Domain\Model\Team
Update 29.06.2020:
tobenschmidt from the TYPO3 Slack channel ( post ) help me out.
return [
\Mexan\MxnTeam\Domain\Model\Team::class => [
'tableName' => 'tx_news_domain_model_news',
'recordType' => \Mexan\MxnTeam\Domain\Model\Team::class,
],
\Mexan\MxnTeam\Domain\Model\Client::class => [
'tableName' => 'tx_news_domain_model_news',
'recordType' => \Mexan\MxnTeam\Domain\Model\Client::class,
],
\GeorgRinger\News\Domain\Model\News::class => [
'tableName' => 'tx_news_domain_model_news',
//'recordType' => 0,
'subclasses' => [
\Mexan\MxnTeam\Domain\Model\Team::class,
\Mexan\MxnTeam\Domain\Model\Client::class,
]
],
];
This works fine, even with 2 custom types.
but unfortunately the default news are no longer loaded
but if I add recordType => 0
, then only normal news and my custom types are visible, but not the type 1 and 2 (Internal and external)
I updated the extension: mxn_team
is there a way to prevent this?