This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » legacy support » symfony 1.2 » Routing problem
Routing problem [message #98932] Wed, 12 May 2010 15:09 Go to next message
masterix  is currently offline masterix
Messages: 41
Registered: September 2008
Member
Hi,

I have a problem with my routing rules. It worked and after some changes(unfortunately I don't know which changes) it stopped.

Part of my routing.yml:
profile:
  url: /profil.html
  param: { module: sfGuardAuth, action: profile }
  options:
    segment_separators: [',','/','.']

profile_comments:
  url: /komentarze,:page.html
  param: { module: sfGuardAuth, action: comments, page: 1 }
  options:
    segment_separators: [',','/','.']

profile_comment_add:
  url: /skomentuj.html
  param: { module: sfGuardAuth, action: commentAdd }
  options:
    segment_separators: [',','/','.']
homepage:
  url:   /
  param: { module: restaurant, action: index }

default:
  url:   /:module/:action/*

And in layout.php I have:
<a href="<?php echo url_for('@profile');?>" style="color: #FFFFFF; text-decoration: none;"><b>Profil</b></a>

And if i try to click on this link I'm redirected to homepage. Logs in web toolbar show:
Quote:

Match route "homepage" (/) for / with parameters array ( 'module' => 'restaurant', 'action' => 'index',)

Why it didn't match profile rule?

Cheers,
masterix
Re: Routing problem [message #98943 is a reply to message #98932 ] Wed, 12 May 2010 17:33 Go to previous messageGo to next message
halfer  is currently offline halfer
Messages: 9535
Registered: January 2006
Location: West Midlands, UK
Faithful Member
Hmm, I am not familiar with "segment_separators" but I am guessing that it is treating "/profil.html" as "/profil/html", since the dot becomes a separator. I would remove this key, or at least see what happens if you remove the dot from the seqment_separators list.


Remember Palestine
Re: Routing problem [message #98954 is a reply to message #98932 ] Wed, 12 May 2010 18:49 Go to previous messageGo to next message
masterix  is currently offline masterix
Messages: 41
Registered: September 2008
Member
Nothing changed after removing '.' from separators.
Re: Routing problem [message #98981 is a reply to message #98932 ] Thu, 13 May 2010 10:30 Go to previous messageGo to next message
halfer  is currently offline halfer
Messages: 9535
Registered: January 2006
Location: West Midlands, UK
Faithful Member
Did you clear the cache after you did so?

Have you looked at your debug toolbar to see if it understood your changes?


Remember Palestine
Re: Routing problem [message #98987 is a reply to message #98981 ] Thu, 13 May 2010 10:53 Go to previous message
masterix  is currently offline masterix
Messages: 41
Registered: September 2008
Member
I cleared cache. It still redirects me to the homepage.
Previous Topic:How to convert a SQL query to a Doctrine left join with subquery
Next Topic:Problem with propel:build-all (with SfGuardUser foreign keys)
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software