[TYPO3-dev] Internal redirect creates cHash Exception

Hannes Lau office at hanneslau.de
Thu Sep 10 11:12:42 CEST 2015


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



More information about the TYPO3-dev mailing list