Development

#4942 (sfWebController::redirect does not accept generated urls)

You must first sign up to be able to contribute.

Ticket #4942 (closed defect: fixed)

Opened 8 months ago

Last modified 8 months ago

sfWebController::redirect does not accept generated urls

Reported by: jeremy Assigned to: fabien
Priority: minor Milestone: 1.2.0 RC1
Component: controller Version: 1.2.0 BETA2
Keywords: redirect, generateUrl Cc:
Qualification: Unreviewed

Description

Inside of an action, calling $this->redirect with a generated URL does not redirect to a valid page (at least in a dev environment).

Suppose I have a route 'sample' that simply redirects to the page /sample. In a dev environment, if I call:

$this->redirect($this->generateUrl('sample'));

Symfony redirects to /frontend_dev.php/frontend_dev.php/sample. This is because sfWebController::redirect also calls generateUrl, resulting in frontend_dev.php being inserted twice.

If this is not considered proper to call redirect with a generated URL, the documentation should be updated to indicate this (e.g. http://www.symfony-project.org/tutorial/1_2/whats-new#Action indicates this call should be possible.)

Change History

11/15/08 22:14:18 changed by FabianLange

  • milestone changed from 1.2.0 to 1.2.0 RC1.

11/16/08 18:37:33 changed by fabien

  • status changed from new to closed.
  • resolution set to fixed.

in r13026

The Sensio Labs Network

Since 1998, Sensio Labs has been promoting the Open-Source software movement by providing quality web application development, training, consulting, and supporting several large Open-Source projects.