The multistep wizard and $_GET['destination'] doesn't play well together. As I could really use the ability to get the wizard form to redirect users back when they press save (but not when they press update), here's a patch that I believe improves the situation.

It makes sure that the destination parameter persists when passing from wizard page to wizard page, and redirects back to the url of the destination paramerter when returning or canceling.

Relies on the fix in #1702492: Drupal 6 code in wizard.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Xen’s picture

The panels patch in #1702506: Admin links for mini panel content type shows this one in action.

Xen’s picture

Found a notice, here's a new patch. Took the oppotunity to use !empty everywhere.

arnested’s picture

Hmm... some debugging and code review revealed a few issues:

- "static $destination" is not needed in ctools_wizard_get_path()

- mini panel is not saved. Removing the addition to ctools_wizard_defaults() fixes this although I currently can't explain why (probably because destination is set as query parameter in $form_state['redirect'].

merlinofchaos’s picture

Committed and pushed #3.

merlinofchaos’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

bonrita’s picture

In version 1.5 this error is still existing for non-ajax forms.

bonrita’s picture

FileSize
824 bytes

In version 1.5 this error is still existing for non-ajax forms.

Fixing code indentation.

joelpittet’s picture

@bonrita there are quite a few stable releases since 1.5 please consider updating your ctools version