views:

44

answers:

1

Hi,

I've got following URL in symfony (specifics not important):

/frontend_dev.php/something/25/apple

... and a routing rule:

/something/:id/:word

The URL works fine when clicked through to on the site, but not when I type in the URL. Instead, symfony says:

Unable to find a matching route to generate url for params "NULL".

The weird thing is that I can navigate to this page and it works, but when hitting Enter in the browser address bar, it no longer finds it.

Any thoughts on what might be the cause of something like this generally?

I should also add that the URL was working fine when typed in the address bar earlier, but doesn't anymore, and I'm not sure what's there that might be interfering with it.

Thanks in advance.

UPDATE:

The exact routing rule:

profile:
  url:    /profile/:id/:un
  param:  {module: profile, action: profile}

UPDATE:

Debug toolbar log (the higlighted part):

Unable to find a matching route to generate url for params "NULL". Toggle debug stack
#4 » in sfException::outputStackTrace() from SF_ROOT_DIR\lib\vendor\symfony\lib\exception\sfException.class.php line 110
#3 » in sfException->printStackTrace() from SF_ROOT_DIR\lib\vendor\symfony\lib\controller\sfFrontWebController.class.php line 52
#2 » in sfFrontWebController->dispatch() from SF_ROOT_DIR\lib\vendor\symfony\lib\util\sfContext.class.php line 170
#1 » in sfContext->dispatch() from SF_ROOT_DIR\web\frontend_dev.php line 13

RESOLVED:

Found it....

I had this in my code on the failing page:

<?php echo link_to(__('Back to previous page').' &#8250;', $sf_request->getReferer()) ?>

The referer fails when typing address into bar.

+1  A: 

Unless you're neglecting to mention that you navigate to this page usually from forms and it's the lack of POST data that is upsetting the routing; which I'm thinking this is not- this surely must be an issue with your browser.

Have you tried this in a different browser on your system?

If you're still having issues can you copy in the relevant section of your routing.yml?

Steve
Tom
@Steve: thanks for your help.
Tom