[TYPO3-mvc] Validation fails - but not going back to newAction

David Effendi david.effendi at limeflavour.com
Wed Jun 11 19:51:22 CEST 2014


Hi all,

since this morning I have a strange behavior of my custom validation in TYPO3 ver 6.1.9. 

The following setup

There is a form for a newsettersubscription with a newAction and a createAction.
According to Patrick Lobachers newest book "TYPO3 Extbase" I've set up two action validators which are being called at the createAction

/**
 * action new
 *
 * @param \LF\LfNewsletterSubscription\Domain\Model\Recipient $newRecipient 
 * @return string An HTML form for creating a new recipient
 * @ignorevalidation $newRecipient
 * @dontverifyrequesthash
 */
public function newAction(\LF\LfNewsletterSubscription\Domain\Model\Recipient $newRecipient = NULL) {
..
}

/**
 * action create
 *
 * @param \LF\LfNewsletterSubscription\Domain\Model\Recipient $newRecipient
 * @validate $newRecipient LF.LfNewsletterSubscription:Recipient
 * @validate $newRecipient LF.LfNewsletterSubscription:IsUniqueEmail
 * @return void
 */
public function createAction(\LF\LfNewsletterSubscription\Domain\Model\Recipient $newRecipient) {
..
}


So far so good ;)

Both validators do their work - they are called, return FALSE, if the requirements are not met, and $this->result->forProperty is being set.

Until this morning this error was displayed inside the newAction form, saying same email address has already been registered.

But all of a sudden although this error is being added in the validator, the createAction is called - and not as expected, the newAction displaying the error.

We did upgrade from 6.1.7 to 6.1.9 - but a rollback didn't work.

I first took the "old" way of annotating the validators in the action annotations ála
@validate $newRecipient \LF\LfNewsletterSubscription\Validation\Validator\IsUniqueEmailValidator
same result

Does anybody have any idea? Did anybody stumble upon a similar problem yet?

I'd be grateful for a hint :D

cheers
David



More information about the TYPO3-project-typo3v4mvc mailing list