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 » plugins » User management plugins » Problems with redirection and sfGuard for Symfony 1.1
Problems with redirection and sfGuard for Symfony 1.1 [message #62691] Thu, 09 October 2008 15:42 Go to next message
reynierpm  is currently offline reynierpm
Messages: 50
Registered: November 2007
Location: Cuba
Member
Hi every:
I'm using sfGuard plugin in one of my applications. When I login inside the application I get a server 500 response wich is a Internal Server Error. I made some changes in my routing.yml file and now look like this :
homepage:
  url:   /
  param: { module: geslicsoft, action: index }

And my action.class.php is this:
public function executeIndex($request)
{
	$user = $this->getUser();
	if (!$user->isAuthenticated()) {
		return $this->redirect('@sf_guard_signin');
	}
	$this->culture = $user->getCulture();
	return sfView::SUCCESS;
}


I try this URL also http://gestion.local/backend_dev.php and when I login inside the system I get this message error:

[InvalidArgumentException]
An internal URI must contain a module and an action (module/action) ("" given).

Also you can check the backend_dev.log content here http://paste.org/index.php?id=3976

Where is the problem?


Reynier Pérez Mira
Re: Problems with redirection and sfGuard for Symfony 1.1 [message #62696 is a reply to message #62691 ] Thu, 09 October 2008 16:47 Go to previous messageGo to next message
weaverryan  is currently offline weaverryan
Messages: 781
Registered: November 2007
Location: Nashville, TN
Faithful Member

My guess is that this isn't related directly to sfGuard, but rather that the page that sfGuard is redirecting you to has a bad link_to tag in it. Go into your development mode (backend_dev.php) and look at what the stack trace is for your error. If you go down a few lines, it'll probably show you exactly which file and which line is calling the link_to or url_for method that is hurting you. This is a common error - I get it all the time when I start moving too fast and forget something.


Ryan Weaver
http://www.sympalphp.org
http://www.thatsquality.com
@weaverryan
Re: Problems with redirection and sfGuard for Symfony 1.1 [message #62699 is a reply to message #62691 ] Thu, 09 October 2008 16:59 Go to previous messageGo to next message
reynierpm  is currently offline reynierpm
Messages: 50
Registered: November 2007
Location: Cuba
Member
I try the backend_dev.php and see the stack trace output (just for the first five) at this URL http://paste.org/index.php?id=3993 I really can't find where the error is


Reynier Pérez Mira
Re: Problems with redirection and sfGuard for Symfony 1.1 [message #62707 is a reply to message #62699 ] Thu, 09 October 2008 17:38 Go to previous messageGo to next message
weaverryan  is currently offline weaverryan
Messages: 781
Registered: November 2007
Location: Nashville, TN
Faithful Member

The problem is in your layout.php file:

link_to(image_tag('home', array(('title')=>__('inicio'), 'alt'=>__('inicio'))),''),


It should instead be:

link_to(image_tag('home', array(('title')=>__('inicio'), 'alt'=>__('inicio'))),'@some_route_here'),


Ryan Weaver
http://www.sympalphp.org
http://www.thatsquality.com
@weaverryan
Re: Problems with redirection and sfGuard for Symfony 1.1 [message #62713 is a reply to message #62707 ] Thu, 09 October 2008 17:57 Go to previous message
reynierpm  is currently offline reynierpm
Messages: 50
Registered: November 2007
Location: Cuba
Member
Thanks a lot, this solve the problem


Reynier Pérez Mira
Previous Topic:sfGuardLogin & AJAX
Next Topic:'Remember me' keys are shared between apps
Goto Forum:
  

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