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.

Files: 
CommentFileSizeAuthor
#3 ctools-destination-in-wizard-1702498-3.patch1.8 KBarnested
PASSED: [[SimpleTest]]: [MySQL] 60 pass(es).
[ View ]
#2 ctools-destination-in-wizard-1702498-2.patch2.44 KBXen
PASSED: [[SimpleTest]]: [MySQL] 58 pass(es).
[ View ]
ctools-destination-in-wizard.patch2.43 KBXen
PASSED: [[SimpleTest]]: [MySQL] 51 pass(es).
[ View ]

Comments

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

StatusFileSize
new2.44 KB
PASSED: [[SimpleTest]]: [MySQL] 58 pass(es).
[ View ]

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

StatusFileSize
new1.8 KB
PASSED: [[SimpleTest]]: [MySQL] 60 pass(es).
[ View ]

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'].

Committed and pushed #3.

Status:Needs review» Fixed

Status:Fixed» Closed (fixed)

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