I had old legacy websites on multiple domains and languages consolidated to a new unified drupal installation (domain_access + i18n + migrate + redirect + domain_redirect + etc...). Top that, most of the old urls had querystrings part basic structure. I managed with some tweaking to succesfully make the whole thing work.
I noticed just recently a bug of infinite loops on a menu link that still reffered to the old website page URL.
I updated to latest dev version, disabled global redirect, cleared cache and it still did not work.
debug data did not provide much help either:
I got this data called ten times in a row (in redirect_redirect) before the browser gave that request cant be completed message.
(
[redirect] => stdClass Object
(
[rid] => 887
[hash] => qxdO7tPh0dPWv1wlv_VfbJGtY4EVy1Y_OnIecWA7uAQ
[type] => redirect
[uid] => 1
[source] =>
[source_options] => Array
(
[query] => Array
(
[cmd] => crisis.440
)
[domain_id] => 3
)
[redirect] => node/2865
[redirect_options] => Array
(
[query] => Array
(
[cmd] => crisis.440
)
[domain_id] => 3
[base_url] => http://mywebsite.co.il
[absolute] => 1
)
[language] => und
[status_code] => 301
[count] => 101
[access] => 1407055497
[weight] => 1
[callback] => redirect_goto
[cache] => 1
)
[callback] => redirect_goto
)Turns out that disabling "Retain query string through redirect. " managed to make it all ok again, re-enabling global redirect and testing shows it works ok now. no infinite loop anymore.
Hope this helps you guys to figure out how to prevent circular redirect, maybe make a test in the validation logic to see if it works with that setting turned off and then issue a warning of some sort to help the poor user who needs to debug this.
I have seen multiple issues regarding infinite redirect loops and bugs which can apply to my scenario, so I trust whoever know what's the dev snapshot & issues state is for categorizing and tagging this if its a duplicate, as I am not sure myself what is relevant.
Comments
Comment #1
tommeir commentedComment #2
pere orgaSee #1796596: Fix and prevent circular redirects