Posted by Xen on July 27, 2012 at 11:42am
4 followers
| 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.
| Attachment | Size | Status | Test result | Operations |
|---|---|---|---|---|
| ctools-destination-in-wizard.patch | 2.43 KB | Idle | PASSED: [[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.
#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'].
#4
Committed and pushed #3.
#5
#6
Automatically closed -- issue fixed for 2 weeks with no activity.