Bug #91388
closedExtending from the User Table
0%
Description
Hi,
I have built an extension for 9.5. This extends the fe_users table. (My model is simply called User)
The change #87623 (https://docs.typo3.org/c/typo3/cms-core/master/en-us/Changelog/10.0/Breaking-87623-ReplaceConfigpersistenceclassesTyposcriptConfiguration.html ) caused my TypoScript:
config.tx_extbase {
persistence {
classes {
TYPO3\CMS\Extbase\Domain\Model\FrontendUser {
subclasses {
Tx_Usertools_User = Cylancer\Usertools\Domain\Model\User
}
}
Cylancer\Usertools\Domain\Model\User {
mapping {
tableName = fe_users
recordType = 0
}
}
}
}
}
to move it to the PHP class:
<?php
declare(strict_types = 1);
return [
\TYPO3\CMS\Extbase\Domain\Model\FrontendUser::class => [
'subclasses' =>
[ 'Tx_Usertools_User' => 'Cylancer\Usertools\Domain\Model\User' ]
],
\Cylancer\Usertools\Domain\Model\User::class => [
'tablename' => 'fe_users',
'recordType' => 0
]
];
Now I have a repository for the user. This repository is derived from FrontendUserRepository.
If my controller
this->userRepository->findByUid(...) calls, I get an exception:
(1/3) #1472074485 TYPO3\CMS\Extbase\Persistence\Generic\Storage\Exception\SqlErrorException
Table 't3_demo.tx_usertools_domain_model_user' doesn't exist
Somehow the mapping doesn't seem to work properly anymore. Either I didn't understand the docu correctly or the mapping I defined doesn't seem to have gotten around in the logic everywhere.
How do you evaluate this?
As an example I have attached my extension.
Install it and try the frontend plugin "Edit profile" if you are logged in as frontend user.
Regards Clemens
Files