2

I am using flags by the Flag module. I added two action on that flag through Flag actions:

  • The first one is to send an email to the site admin whenever the node is flagged.
  • The second is to do a Page Redirect. This action does not works and gives me an ajax error.

In my search I found this was an issue for flag module for Drupal 6. However, it still does not work. My version of Flag is 7.x-2.0 and I am using Drupal 7.

After trying out with action, I went for the better option, i.e, using Rules. I added a reaction rule with the action: A node is flagged under "my_flag" and the event : Page redirect. And I also checked the forced redirect. Its still not working.

Would really appreciate any help or suggestions regarding this.

1 Answer 1

1

I realise this is a long time ago but for anyone else who arrives here: you can't redirect when doing AJAX flagging, because the redirect applies to the AJAX call not the current page.

It's theoretically possible, with D7, to return a page redirect using AJAX commands but I'm not sure off the top of my head how you would achieve that in this case, or whether you'd need some modification to the Flag module code to allow it to occur.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.