[TYPO3-mvc] Extbase objects only partly (uid, pid) filled

Jonas Eberle jonas.eberle at d-mind.de
Thu Aug 14 17:22:07 CEST 2014


Hi,

I experience a strange problem on a Typo3 6.2.4 with PHP 5.5 based on 
ws_t3bootstrap at a domainfactory managed server:

Symptom:
Extbase domain models are only filled with uid and pid and all other 
data fields are NULL.

This function, for example:
     /**
      * @return bool|\TYPO3\CMS\Extbase\Domain\Model\FrontendUser
      */
     public function loggedInFrontendUser() {
         $user = $GLOBALS['TSFE']->fe_user->user;
         if (is_null($user)) {
             return FALSE;
         }

         $frontendUser = 
$this->frontendUserRepository->findByUid($user['uid']);
         return $frontendUser;
     }

would return an incomplete object (only pid, uid fields correctly 
filled, the rest NULL) although the user is logged in, the database 
record in fe_users looks good and even at the same time the 
FrontendUser-record looks fine in the backend.

Or (even simpler):
     $questionnaireGroups = $this->questionnaireGroupRepository->findAll();

directly in the frontend-controller would return a correct number of 
objects that have the beforementioned symptoms. The objects are fine in 
the databse, too.



When does it happen:
* It can be reliably triggered by hittting 'Flush system caches'
* Installing another extension triggered it once
* ... sometimes it seems to come out of the blue


What does not change the symptom?
* changing PHP to 5.4 or 5.3
* disabling or enabling the PHP 5.5-opcode-Cache or configuring it as in 
https://forge.typo3.org/issues/51475 (I left out the blacklist-part, though)


What does sometimes fix the symptom?
* Using 'Clear all Cache' in the Install Tool
* ... sometimes it seems to fix itself without my intervention

What does always fix it?
* Deinstalling + reinstalling my extension


I am really puzzled. It only seems to affect my extension.

I guess the Extbase configuration (of my plugin?) is sometimes (?) 
broken somehow. I will attach constants.txt and setup.txt


Have you ever experienced such behaviour or can give me hints on how to 
debug it? What would you look for if you would experience this?
Thank you!

Jonas




constants.txt:

plugin.tx_kets {
     view {
         # cat=plugin.tx_kets/file; type=string; label=Path to template 
root (FE)
         templateRootPath = EXT:kets/Resources/Private/Templates/
         # cat=plugin.tx_kets/file; type=string; label=Path to template 
partials (FE)
         partialRootPath = EXT:kets/Resources/Private/Partials/
         # cat=plugin.tx_kets/file; type=string; label=Path to template 
layouts (FE)
         layoutRootPath = EXT:kets/Resources/Private/Layouts/
     }
     persistence {
         # cat=plugin.tx_kets//a; type=string; label=Default storage PID
         storagePid =
         classes {
             TechnologyPlatform.newRecordStoragePid =
             Person.newRecordStoragePid =
             Country.newRecordStoragePid =
             TechnologyPlatformType.newRecordStoragePid =
             MarketSector.newRecordStoragePid =
             Technology.newRecordStoragePid =
             Readiness.newRecordStoragePid =
             Questionnaire.newRecordStoragePid =
             QuestionnaireGroup.newRecordStoragePid =
             QuestionnaireData.newRecordStoragePid =
             FrontendUserGroup.newRecordStoragePid =
             FrontendUser.newRecordStoragePid =
             YearValue.newRecordStoragePid =
             TechnologyReadiness.newRecordStoragePid =
         }
     }
     settings {
         usergroupTpUid =
         usergroupTpDataApproverUid =
         pidLogin =
         pidContact =
         pidPrivateTp =
     }
}

module.tx_kets {
     view {
         # cat=module.tx_kets/file; type=string; label=Path to template 
root (BE)
         templateRootPath = EXT:kets/Resources/Private/Templates/
         # cat=module.tx_kets/file; type=string; label=Path to template 
partials (BE)
         partialRootPath = EXT:kets/Resources/Private/Partials/
         # cat=module.tx_kets/file; type=string; label=Path to template 
layouts (BE)
         layoutRootPath = EXT:kets/Resources/Private/Layouts/
     }
}



setup.txt:


plugin.tx_kets {
     view {
         templateRootPath = {$plugin.tx_kets.view.templateRootPath}
         partialRootPath = {$plugin.tx_kets.view.partialRootPath}
         layoutRootPath = {$plugin.tx_kets.view.layoutRootPath}
     }
     persistence {
         storagePid = {$plugin.tx_kets.persistence.storagePid}
         classes {
             TechnologyPlatform.newRecordStoragePid = 
{$plugin.tx_kets.persistence.classes.TechnologyPlatform.newRecordStoragePid}
             Person.newRecordStoragePid = 
{$plugin.tx_kets.persistence.classes.Person.newRecordStoragePid}
             Country.newRecordStoragePid = 
{$plugin.tx_kets.persistence.classes.Country.newRecordStoragePid}
             TechnologyPlatformType.newRecordStoragePid = 
{$plugin.tx_kets.persistence.classes.TechnologyPlatformType.newRecordStoragePid}
             MarketSector.newRecordStoragePid = 
{$plugin.tx_kets.persistence.classes.MarketSector.newRecordStoragePid}
             Technology.newRecordStoragePid = 
{$plugin.tx_kets.persistence.classes.Technology.newRecordStoragePid}
             Readiness.newRecordStoragePid = 
{$plugin.tx_kets.persistence.classes.Readiness.newRecordStoragePid}
             Questionnaire.newRecordStoragePid = 
{$plugin.tx_kets.persistence.classes.Questionnaire.newRecordStoragePid}
             QuestionnaireGroup.newRecordStoragePid = 
{$plugin.tx_kets.persistence.classes.QuestionnaireGroup.newRecordStoragePid}
             QuestionnaireData.newRecordStoragePid = 
{$plugin.tx_kets.persistence.classes.QuestionnaireData.newRecordStoragePid}
             FrontendUserGroup.newRecordStoragePid = 
{$plugin.tx_kets.persistence.classes.FrontendUserGroup.newRecordStoragePid}
             FrontendUser.newRecordStoragePid = 
{$plugin.tx_kets.persistence.classes.FrontendUser.newRecordStoragePid}
             YearValue.newRecordStoragePid = 
{$plugin.tx_kets.persistence.classes.YearValue.newRecordStoragePid}
             TechnologyReadiness.newRecordStoragePid = 
{$plugin.tx_kets.persistence.classes.TechnologyReadiness.newRecordStoragePid}
         }
     }
     features {
         # uncomment the following line to enable the new Property Mapper.
         # rewrittenPropertyMapper = 1
     }
     settings {
         usergroupTpUid = {$plugin.tx_kets.settings.usergroupTpUid}
         usergroupTpDataApproverUid = 
{$plugin.tx_kets.settings.usergroupTpDataApproverUid}
         pidLogin = {$plugin.tx_kets.settings.pidLogin}
         pidContact = {$plugin.tx_kets.settings.pidContact}
         pidPrivateTp = {$plugin.tx_kets.settings.pidPrivateTp}
     }
}

plugin.tx_kets._CSS_DEFAULT_STYLE (
<<< snip >>>
)

  # Module configuration
module.tx_kets {
     view {
         templateRootPath = {$module.tx_kets.view.templateRootPath}
         partialRootPath = {$module.tx_kets.view.partialRootPath}
         layoutRootPath = {$module.tx_kets.view.layoutRootPath}
     }
}
module.tx_kets.persistence < plugin.tx_kets.persistence
module.tx_kets.settings < plugin.tx_kets.settings



More information about the TYPO3-project-typo3v4mvc mailing list