Routing not working after upgrade
fkh000 opened this issue · 4 comments
Hi,
after a long time I upgraded one of my projects and seems like the routing stopped working.
My routes.php:
$albums = array('galeria', 'vystavy');
foreach($albums as $album) {
MvcRouter::public_connect($album, array('controller' => 'galleries', 'action' => 'show', 'album' => $album));
MvcRouter::public_connect($album . '/{:id}', array('controller' => 'galleries', 'action' => 'show', 'album' => $album));
}
Example URL:
galeria/2018/
I expect these parameters passed to controller:
array(4) { ["controller"]=> string(9) "galleries" ["action"]=> string(4) "show" ["id"]=> string(4) "2018" ["album"]=>"galeria" }
But instead I get only this. It is basically right, just missing the 'album' parameter.
array(3) { ["controller"]=> string(9) "galleries" ["action"]=> string(4) "show" ["id"]=> string(4) "2018" }
Used to work in older version (not sure which was that). Is there some other way to pass variables from route to controller?
PS. I refreshed the permalinks.