[FLOW3-general] link.action with string argument

Robert Lemke robert at typo3.org
Mon Jan 16 18:01:02 CET 2012


Hi Heiko,

a fresh response for your stale question:

On 22.12.2011, at 16:48, Heiko Kromm | Paints wrote:

> I have a action, which expects a string as argument. 
> /** 
> * dummy action 
> * 
> * @param string $test Teststring 
> * @return void 
> */ 
> public function dummyAction($test) { 
> $this->redirect('index'); 
> } 
> 
> If I create a link in my view without the $test argument I will get a correct link: 
> <f:link.action action="dummy">TEST</f:link.action> 
> http://www.domain.de/mycontrollerfolder/mycontroller/dummy 
> 
> If I add the $test argument the link is broken: 
> <f:link.action action="dummy" arguments="{test : 'TEST'}">TEST</f:link.action> 
> http:// www.domain.de /My.Applicationname/ mycontrollerfolder %5C mycontroller /dummy?test=TEST 
> 
> Why does this occur? 


This most likely happens because FLOW3 could not find a matching route for the combination of controller, action and arguments. Make sure to have some route in your routes configuration which matches and if in doubt, make sure to include the FLOW3 fallback routes.

This might give you some more hints:
http://flow3.typo3.org/documentation/guide/partiii/routing.html

Cheers,
Robert

-- 
Robert Lemke – Fluent Code Artisan
http://robertlemke.de/blog

Lead Developer TYPO3 Phoenix and FLOW3
Co-Founder TYPO3 Association

Get involved: typo3.org – flow3.org



More information about the FLOW3-general mailing list