[TYPO3-mvc] Extbase validation error

Peter Bücker news.naag at gmx.net
Sat Feb 26 06:16:59 CET 2011


Hi Thomas,

try using "@param mixed $quantity" and "@dontvalidate $quantity". If the
parameter type is set to integer, Extbase will always check that
$quantity is a valid integer.

Regards,
Peter

On 02/26/2011 12:08 AM, Thomas "Thasmo" Deinhamer wrote:
> Hi guys and gals!
> 
> That's my method:
> 
> /**
>  * Add action for this controller.
>  *
>  * @param Tx_HypeStore_Domain_Model_Product $product
>  * @param integer $quantity
>  * @return void
>  */
> public function addAction(Tx_HypeStore_Domain_Model_Product $product,
> $quantity = NULL) {
> // ...
> }
> 
> The problem is, if quantity is not set at all in the URL,
> the following error pops up:
> An error occurred while trying to call
> Tx_HypeStore_Controller_CartController->addAction(). Error: Validation
> errors for argument "quantity".
> 
> Any idea what's causing this? Is it a problem of Extbase in general
> or is it related to Extbase 1.2, which I'm using?
> 
> Thanks for any hints on this!
> 
> Regards,
> Thomas


More information about the TYPO3-project-typo3v4mvc mailing list