[TYPO3-dev] Internal redirect creates cHash Exception
Daniel Ritter
it.daniel.ritter at gmail.com
Thu Sep 10 13:30:02 CEST 2015
Quote: Hannes Lau wrote on Thu, 10 September 2015 11:12
----------------------------------------------------
> Hi Daniel!
>
> > were using realUrl and my Problem is that when I select a category I become an 404-Reason: Request parameters could not be validated (&cHash comparison failed). My redirect looks so :
> >
> > $this->redirect($request->getControllerActionName(),
> > $request->getControllerName(), $request->getControllerExtensionName(),
> > ['category'=>null, 'entry' => $entry]);
>
> Did you map the category parameter to any path segement in RealUrl? If
> so, you might have to adjust your RealURL configuration to deal with null.
>
> Yet, I am not sure if I fully understand the need for a redirection.
> Maybe you could just use two actions
>
> How do you want your URLs to look like, for a listing and a single item?
>
> A simple approach would be to use two actions:
>
> /*
> * List all items. If a category is given, list only the items
> * of that category.
> */
> function listAction($category)
>
> /*
> * Show a single item
> */
> function showAction($item)
>
> The HTML generated by the list action would then contain links to the
> showAction.
>
> Cheers,
> Hannes
>
>
> --
> Hannes Lau
> [Berlin, GMT+2]
> Tel: +49 30 45096367
> Mob: +49 179 1304344
----------------------------------------------------
Thank you Hannes,
I've got only one action because I only have a list view with one selected and shown entry(If not manually selected the first of the category). I've also checked that any param is maped in RealURL. If I wouldn't use the redirect I would have two URL category/categoryname.html
and entry/nameOfTheFirstCategoryEntry.html. Through the redirect I've got only the second one.
Viele Grüße aus Fulda:-)
More information about the TYPO3-dev
mailing list