I saw the post http://drupal.org/node/462012 but for me it's not working.
I created a triggered rule - "A node has been flagged, under "Agenda" (Agenda is my node) with a single "DO" action: "Page Redirect" to "user/register".
I checked "Force redirecting to the given path, even if a destination parameter is given".
"Link Type" is set to Normal Link.
But when click on the flag link on the node the url given is "http://www.example.com/flag/flag/agenda/1040?destination=node%2F1040&tok..."
And of course back to the same node when I click.
This occurs both with anonymous user (Session API installed) and with authenticated user.
Can anyone help?
Comments
Comment #1
rogeriodec CreditAttribution: rogeriodec commentedI actually spent many hours trying to debug this module, but I'm not an expert in php.
The only thing that came closest was that this problem does not occur in 6.x-1.3 version.
But unfortunately the 6.x-1.3 version does not allow anonymous users.
So my hands are tied.
Comment #2
rogeriodec CreditAttribution: rogeriodec commentedAnyone?
Comment #3
davemaxg CreditAttribution: davemaxg commentedI had the same problem and found this
specifically:
unset($_REQUEST['destination']);
before drupal_goto() if doesn't work.
which worked for me. I am using hook_flag in a php module, but I would think this should solve your problem if you implement it as a step within rules.
Comment #4
quicksketchProbably not a critical bug. I personally don't use the Rules integration, so we'll need a patch for this to be corrected.
Comment #5
grasmash CreditAttribution: grasmash commentedFor anyone encountering this in Drupal 7, @davemaxg's solution will not work.
Rather than unsetting $_REQUEST['destination'] and calling drupal_goto(), you can just overwrite $_GET['destination'];
$_GET['destination'] = '<front>';
. Easy enough.Comment #6
nicodv CreditAttribution: nicodv commented@madmatter23 I have this problem, sorry to ask you, but no good coder here. Could you post the code as it should be published?
And, could I input it directly in php within the rule?
thanks so much
Comment #7
grasmash CreditAttribution: grasmash commented@nicodv The code is just
Honestly, I can't remember if I put this in a rule or implemented hook_flag(), but I'd guess that you'll be ok either way.
Comment #8
nicodv CreditAttribution: nicodv commentedthanks a lot, I'll give it a try
nico