1

I have created a new extension to add new types and fields to tx_news. I am able to edit the types and the fields correctly in backend, and they are correcty seen in the listings, but when I go to view it in detail I only see it if I clear the cache. This was working fine for me in Typo3 v10 and I'm really a bit desperate.

I am on Typo3 v11.5.8 and news 9.3.1.

ext:quincena/Classes/Domain/Model/Eventos.php

namespace Albr\Quincena\Domain\Model;
class Eventos extends \GeorgRinger\News\Domain\Model\News{
...

ext:quincena/Classes/Domain/Model/Informacion.php

namespace Albr\Quincena\Domain\Model;
class Informacion extends \GeorgRinger\News\Domain\Model\News{
...

ext:quincena/Configuration/Extbase/Persistence/Clases.php

return [
  \GeorgRinger\News\Domain\Model\News::class => [
    'subclasses' => [
      3 => \Albr\Quincena\Domain\Model\Eventos::class,
      4 => \Albr\Quincena\Domain\Model\Informacion::class,
    ]
  ],
  \GeorgRinger\News\Domain\Model\NewsDefault::class => [
      'tableName' => 'tx_news_domain_model_news',
      'recordType' => 0,
  ],
  \GeorgRinger\News\Domain\Model\NewsInternal::class => [
      'tableName' => 'tx_news_domain_model_news',
      'recordType' => 1,
  ],
  \GeorgRinger\News\Domain\Model\NewsExternal::class => [
      'tableName' => 'tx_news_domain_model_news',
      'recordType' => 2,
  ],
  \Albr\Quincena\Domain\Model\Eventos::class => [
    'tableName' => 'tx_news_domain_model_news',
    'recordType' => 3,
  ],
  \Albr\Quincena\Domain\Model\Informacion::class => [
    'tableName' => 'tx_news_domain_model_news',
    'recordType' => 4,
  ],

ext:quincena/Configuration/TCA/Overrides/tx_news_domain_model_news.php

$GLOBALS['TCA']['tx_news_domain_model_news']['columns']['type']['config']['items']['3'] = ['Evento', 3] ;
$GLOBALS['TCA']['tx_news_domain_model_news']['ctrl']['typeicon_classes']['3'] = 'ext-news-type-evento';
$GLOBALS['TCA']['tx_news_domain_model_news']['columns']['type']['config']['items']['3'] = ['Evento', 3, 'ext-news-type-evento'];

$GLOBALS['TCA']['tx_news_domain_model_news']['columns']['type']['config']['items']['4'] = ['Informacion', 4] ;
$GLOBALS['TCA']['tx_news_domain_model_news']['ctrl']['typeicon_classes']['4'] = 'ext-news-type-informacion';
$GLOBALS['TCA']['tx_news_domain_model_news']['columns']['type']['config']['items']['4'] = ['Informacion', 4, 'ext-news-type-informacion'];

I feel that I have missed a detail, but I have reviewed the documentation and other extensions and I can not find it.

Any ideas?

  • In `EXT:quincena/Configuration/Extbase/Persistence/Clases.php` the new type '4' (Informacion) is missing. But seems not to be the cause of the problem. – Julian Hofmann Apr 19 '22 at 15:43
  • 1
    Yes, I cut before type 4 information, just added. Agree that this is not the cause of the problem. – Unai Aizpurua Apr 19 '22 at 15:48

0 Answers0