1

I have extended database table fe_users with new field using extension builder. The fields are visible in backend user-interface, but not available in frontend in Typo3 10.4.x . But the same code works fine in Typo3 9.x frontend and backend.

I have also tried setting recordType to nothing in the ext_typoscript_setup.typoscript but this also does not help

mapping {
    tableName = fe_users
    recordType = 
}

Any ideas on what more to look for?

1

2 Answers 2

3

The table mapping of the Extbase persistence is not longer possible in TypoScript. Migrate your TypoScript to a PHP file named EXT:myextension/Configuration/Extbase/Persistence/Classes.php.

See breaking change 87623 for further details.

A typical Classes.php file looks like the following.

<?php

return [
  \Vendor\Extension\Domain\Model\Object::class => [
    'tableName' => 'tx_extension_domain_model_object',
  ]
];
0
0

This is how I implemented it. There was one more line (.i.e 'subclasses') that had to be added to Michael's response. (This is tested in Typo3 11.x as well)

My Configuration/Extbase/Persistence/Classes.php

<?php
declare(strict_types=1);

return [
    \TYPO3\CMS\Extbase\Domain\Model\FrontendUser::class => [
      'subclasses' => [
          '\T3IN\T3inStores\Domain\Model\UserStore' => \T3IN\T3inStores\Domain\Model\UserStore::class,
      ]        
    ], 
    \T3IN\T3inStores\Domain\Model\UserStore::class => [
        'tableName' => 'fe_users',
        'recordType' => 'Tx_T3inStores_UserStore',
    ],
];

Ref

  • For every superclass additional all subclasses have to be declared under subclasses
  • recordType : Look up the TCA of the model to get this value. Or lookup DB after creating a record of that type.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.