[TYPO3-mvc] validation of extended fe_user model in detailAction

Stephan Petzl spetzl at gmx.at
Mon Apr 19 13:47:22 CEST 2010


Stephan Petzl schrieb:
> hi there!
> 
> i have a controller with an action:
> /**
> *
> * @param Tx_AjadoProfiles_Domain_Model_FrontendUser $user
> * @return void
> */
> public function detailAction(Tx_AjadoProfiles_Domain_Model_FrontendUser 
> $user){
> ...
> }
> 
> in my model:
> 
> class Tx_AjadoProfiles_Domain_Model_FrontendUser extends 
> Tx_Extbase_Domain_Model_FrontendUser{...}
> 
> 
> in the frontend when accessing the detailAction i get an validation error:
> 
> "An error occurred while trying to call 
> Tx_AjadoProfiles_Controller_FrontendUserController->detailAction(). 
> Error: Validation errors for argument "user""
> 
> interesting thing is that this only occurs when using my own model. when 
> i m using the Tx_Extbase_Domain_Model_FrontendUser instead no error 
> message is shown and everything works fine (everything but access to 
> extended properties)
> 
> any ideas what i might have messed up?
> 

debugged through extbase and found the reason:
i had an annotation

/**
* @var boolean
* @validate NotEmpty
*/
protected $showFullname;

and showFullname was not set in the DB.

is there a reason why the error message is not more specific? great 
thing would be to show each validation error which occures...

-- 
Best Regards
Stephan Petzl


More information about the TYPO3-project-typo3v4mvc mailing list