[TYPO3-dev] Ignore tx_extbase_type

Richard Davies richard at ocular.co.nz
Thu May 14 00:47:25 CEST 2015


Hi Tim,

You can use the base repository (
TYPO3\CMS\Extbase\Domain\Repository\FrontendUserRepository ) using the
correct configuration. When you pull the results the query result will
return either

   - all models as the typo3 base model
   (TYPO3\CMS\Extbase\Domain\Model\FrontendUser) or
   - each model for each extension correctly

depending on your configuration. You do have to configure everything
correctly for it to work in ext_typoscript_setup.txt (the other extensions
may have their own stuff in their own ext_typoscript_setup which you may
need to override or add to).

If your extension (and the other extensions installed) has nothing set for
config.tx_extbase.persistence.classes.TYPO3\CMS\Extbase\Domain\Model\FrontendUser.subclasses
and nothing is set for
TYPO3\CMS\Extbase\Domain\Model\FrontendUser.mapping.recordType
then all records returned are always of type
TYPO3\CMS\Extbase\Domain\Model\FrontendUser

If you want to get the specific models out, you will have to set the
mappings to be correct. You will have to set
TYPO3\CMS\Extbase\Domain\Model\FrontendUser.mapping.recordType =
Tx_Extbase_Domain_Model_FrontendUser
and each of the subclasses for each extension e.g.:
config.tx_extbase.persistence.classes.TYPO3\CMS\Extbase\Domain\Model\FrontendUser.subclasses.Tx_MyExt_FeUserModel
= Company\Extension\Extbase\Domain\Model\FeUserModel
All fe_user records will also need a type (so empty tx_extbase_type's
should be set to Tx_Extbase_Domain_Model_FrontendUser).

I've found that I have to uninstall, reinstall and sometimes clear the
cache in the install tool for changes to take effect.


Richard

On 14 May 2015 at 02:51, Tim OS <tim.schulz at iconnewmedia.de> wrote:

> Hey,
> got exactly the same problem!
> Multiple Extbase extensions extending fe_users by an own FrontendUser
> model. So setting one "tx_extbase_type" for all users is not possible.
>
> I tried to overwrite the method "findByUid" with my own query setting
> (Doesn't work either):
>
> $query->getQuerySettings()->setEnableFieldsToBeIgnored(array('tx_extbase_type'));
>
> Doesn't this problem exist for all TYPO3 installations with multiple
> extensions of fe_users?
> How did you manage to get the "getRepositoryClassName" to work?
>
> Best regards Tim
>
> _______________________________________________
> TYPO3-dev mailing list
> TYPO3-dev at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-dev
>



More information about the TYPO3-dev mailing list