Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When using finish path and finishing the wizard the page is not redirected. However using $form_state['redirect'] inside the finish callback does work. Isn't the purpose of finish path to make the usage of $form_state['redirect'] obsolete or something different?
My finish callback:
/**
* Callback generated when the add page process is finished.
*/
function linodef_taglists_wizard_add_finish(&$form_state) {
$taglist = &$form_state['taglist'];
// Create a real object from the cache.
linodef_taglists_wizard_add_save($taglist);
// Clear the cache.
linodef_taglists_clear_cache($form_state['cache name']);
//$form_state['redirect'] = 'admin/settings/linodef/taglists';
}
Cancel path works for the cancel submit button but not for the finish submit.
Comment | File | Size | Author |
---|---|---|---|
#2 | ctools_wizard.inc_cancelpath.patch | 702 bytes | Roi Danton |
Comments
Comment #1
merlinofchaos CreditAttribution: merlinofchaos commentedHm. finish path should work the same way cancel path does. This may be a bug.
Comment #2
Roi Danton CreditAttribution: Roi Danton commentedI mixed up 'return path' with (not existing) 'finish path' - 'return path' works as intended. However the cancel path doesn't work as promised in help/wizard.html:
Therefore here is a patch which heeds the cancel path on every finish submit if return path is not set.
Comment #3
merlinofchaos CreditAttribution: merlinofchaos commentedCommitted! Thanks!