#4 new
Brian Bosh

Unexpected redirect at end of wizard

Reported by Brian Bosh | January 17th, 2011 @ 01:05 PM

I have a wizard of 5 steps:

function beforeFilter() {
$this->Wizard->steps = array('user', 'profile', 'term', 'payment', 'confirm'); $this->Wizard->completeUrl = "/users/complete"; $this->Wizard->wizardAction = "join"; }

The final step, confirm, has this process hook:
function _processConfirm() {
debug("made it to process for confirm");
return true;

Which runs as expected. However, following that code running, Wizard attempts a redirect to /users/join. I expect it to redirect to /users/complete. Having added that debug() to _processConfirm, CakePHP started throwing an error:

Warning (2): Cannot modify header information - headers already sent by ....

Viewing the stack trace, it unwinds to
WizardComponent::process() - APP/plugins/wizard/controllers/components/wizard.php, line 245

if ($proceed) {
$this->save(); if (next($this->steps)) {

if ($this->autoAdvance) {

} else {

$this->Session->write('Wizard.complete', $this->read());

$this->controller->redirect($this->wizardAction); // Line 245

} }

I assume that line should read

No comments found

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Shared Ticket Bins

People watching this ticket