You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 28, 2018. It is now read-only.
My Wizard works just fine but I cannot make it work in the end. The _afterComplete ( ) method isn't called. My wizardAction is a prefixed action ( prefix_add ). I tried to set it in the cake array format but it seems to me that your plugin doesn't support it. The problem comes from here, I think :
line 234 to 248
if ($proceed) {
$this->save();
if (next($this->steps)) {
if ($this->autoAdvance) {
$this->redirect();
}
$this->redirect(current($this->steps));
} else {
$this->Session->write('Wizard.complete', $this->read());
$this->reset();
$this->controller->redirect($this->wizardAction);
}
}
When there's a next step, you call Wizard::redirect that builds the url without paying attention to any prefix ( line 361 ). Cake seems to understand alone that it's a prefix, maybe because there's a parameter added at the end and renders the different steps correctly.
But when there is no next step however, you're using directly the Controller::redirect method. A prefix having already been set, the wizard tries in my case to redirect to the name of the method as it is set litterally in my beforeFilter callback but adds the prefix a second time, redirecting to a non existing prefix_prefix_add action.
I tried setting the url in the cake array format, but I fails right from the beginning because since the Wizard::redirect ( ) method calls the Controller::redirect with wizardAction as 'action' parameter, the Router crashes.
Here's what I'm proposing in Wizard::redirect ( ) :
Changing the name of the wizardAction parameter to something like wizardUrl may also be interesting if you decide that supporting prefixes is necessary
Thanks for all the work, it saved me hours of work !
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi,
My Wizard works just fine but I cannot make it work in the end. The _afterComplete ( ) method isn't called. My wizardAction is a prefixed action ( prefix_add ). I tried to set it in the cake array format but it seems to me that your plugin doesn't support it. The problem comes from here, I think :
line 234 to 248
When there's a next step, you call Wizard::redirect that builds the url without paying attention to any prefix ( line 361 ). Cake seems to understand alone that it's a prefix, maybe because there's a parameter added at the end and renders the different steps correctly.
But when there is no next step however, you're using directly the Controller::redirect method. A prefix having already been set, the wizard tries in my case to redirect to the name of the method as it is set litterally in my beforeFilter callback but adds the prefix a second time, redirecting to a non existing prefix_prefix_add action.
I tried setting the url in the cake array format, but I fails right from the beginning because since the Wizard::redirect ( ) method calls the Controller::redirect with wizardAction as 'action' parameter, the Router crashes.
Here's what I'm proposing in Wizard::redirect ( ) :
Changing the name of the wizardAction parameter to something like wizardUrl may also be interesting if you decide that supporting prefixes is necessary
Thanks for all the work, it saved me hours of work !
The text was updated successfully, but these errors were encountered: