Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
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.
Comment | File | Size | Author |
---|---|---|---|
#8 | ctools-destination-in-wizard-1702498-8.patch | 824 bytes | bonrita |
#3 | ctools-destination-in-wizard-1702498-3.patch | 1.8 KB | arnested |
#2 | ctools-destination-in-wizard-1702498-2.patch | 2.44 KB | Xen |
ctools-destination-in-wizard.patch | 2.43 KB | Xen | |
Comments
Comment #1
Xen CreditAttribution: Xen commentedThe panels patch in #1702506: Admin links for mini panel content type shows this one in action.
Comment #2
Xen CreditAttribution: Xen commentedFound a notice, here's a new patch. Took the oppotunity to use !empty everywhere.
Comment #3
arnested CreditAttribution: arnested commentedHmm... 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'].
Comment #4
merlinofchaos CreditAttribution: merlinofchaos commentedCommitted and pushed #3.
Comment #5
merlinofchaos CreditAttribution: merlinofchaos commentedComment #7
bonrita CreditAttribution: bonrita commentedIn version 1.5 this error is still existing for non-ajax forms.
Comment #8
bonrita CreditAttribution: bonrita commentedIn version 1.5 this error is still existing for non-ajax forms.
Fixing code indentation.
Comment #9
joelpittet@bonrita there are quite a few stable releases since 1.5 please consider updating your ctools version