I have a hard time believing I am the only one experiencing this but I cannot see any other reports.
If I trigger a global redirect and include a destination parameter, that destination parameter gets lost.
Example:
http://mysite.com/node/18/edit?destination=somewhere
Results in:
http://mysite.com/some_alias (the destination is blown away)
I managed to fix my problem by moving the destination unset code below the $query_string building.
--- globalredirect.module.old 2012-03-10 20:03:31.227616000 -0400
+++ globalredirect.module 2012-03-10 19:57:11.803616001 -0400
@@ -43,6 +43,12 @@
}
}
+ // Get the query string parameters. If none set, set to NULL
+ $query_string = drupal_get_query_parameters();
+ if (empty($query_string)) {
+ $query_string = NULL;
+ }
+
// Store the destination from the $_GET as, if we leave it in, drupal_goto()
// will go to that instead.
if (isset($_GET['destination'])) {
@@ -50,12 +56,6 @@
unset($_GET['destination']);
}
- // Get the query string parameters. If none set, set to NULL
- $query_string = drupal_get_query_parameters();
- if (empty($query_string)) {
- $query_string = NULL;
- }
-
// Establish the language prefix that should be used, ie. the one that
// drupal_goto() would use
$options = array(
Comments
Comment #1
emilymoi commentedHave been using my patch above for 2 months without problems.
Comment #2
devin carlson commentedA patch to implement the change outlined in the original issue. I've also been using this without issue.
Comment #3
mathieso commentedPatch works! Hooray!!!!!
Comment #4
damienmckennaMaybe we should run the testbot first?
Comment #5
damienmckennaComment #6
damienmckennaComment #7
david_garcia commented+1 RTBC
Comment #8
david_garcia commentedComment #9
socialnicheguru commentedComment #10
maxplus commented#2 works great for me, Thanks!
Comment #11
BarisW commentedLooks good. Thanks a lot!
Comment #13
BarisW commentedCommitted to 7.x-1.x-dev