Download & Extend

Wizard and $_GET['destination']

Project:Chaos tool suite (ctools)
Version:7.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

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.

AttachmentSizeStatusTest resultOperations
ctools-destination-in-wizard.patch2.43 KBIdlePASSED: [[SimpleTest]]: [MySQL] 51 pass(es).View details

Comments

#1

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

#2

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

AttachmentSizeStatusTest resultOperations
ctools-destination-in-wizard-1702498-2.patch2.44 KBIdlePASSED: [[SimpleTest]]: [MySQL] 58 pass(es).View details

#3

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

AttachmentSizeStatusTest resultOperations
ctools-destination-in-wizard-1702498-3.patch1.8 KBIdlePASSED: [[SimpleTest]]: [MySQL] 60 pass(es).View details

#4

Committed and pushed #3.

#5

Status:needs review» fixed

#6

Status:fixed» closed (fixed)

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

nobody click here