I found this bug (https://trac.cakephp.org/ticket/4522) that is
exactly what I mentioned.
Currently, there is no plan to fix this problem, for now you can use
this workaround:
Place this line at your routes.php :
Router::connectNamed(array('namedparam'));

Notice that you must specify all of your project's named parameters in
the above array.


On Dec 24, 9:59 am, Farhadi <[email protected]> wrote:
> Hi,
> I have defined a route:
> Router::connect('/:lang/:controller/:action/*', null, array
> ('lang'=>'[a-z]{2}'));
>
> when I want to create a link using $html->link if there was a named
> parameter in the url, the result is wrong.
> for example when I am in /en/groups/index,
> $html->url(array('lang'=>'en', 'var'=>10)); returns "/groups/index/
> lang:en/var:10" instead of "/en/groups/index/var:10"
>
> Is there anything wrong with the route that I defined or its a bug in
> Router.
>
> by the way there is no other routes defined.
>
> Thank in advance
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to