Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have Number up / down widget. If I set option "Behaviour when user has no permission to vote" to "Redirect to login and show message" and try to vote by user without permission to vote, the widget disappears and gets replaced by string "http://example.com/user/login-to-rate?destination=X"
Which means this condition is triggered:
if ($ahah) {
print url('user/login-to-rate', array('query' => $query, 'absolute' => TRUE));
module_invoke_all('exit') & exit;
}
else {
drupal_goto('user/login-to-rate', array('query' => $query));
}
So my question is: what should I do to make redirect work?
Comment | File | Size | Author |
---|---|---|---|
#1 | rate-ahah_redirect-2201577-1.patch | 1.2 KB | quotesBro |
Comments
Comment #1
quotesBro CreditAttribution: quotesBro commentedI figured this out.
AJAX (AHAH) does not support redirects, so we need to print some JavaScript code which actually redirects a user.
Comment #2
quotesBro CreditAttribution: quotesBro commented