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?

CommentFileSizeAuthor
#1 rate-ahah_redirect-2201577-1.patch1.2 KBquotesBro
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

quotesBro’s picture

Version: 7.x-1.6 » 7.x-1.x-dev
Category: Support request » Bug report
FileSize
1.2 KB

I figured this out.
AJAX (AHAH) does not support redirects, so we need to print some JavaScript code which actually redirects a user.

quotesBro’s picture

Status: Active » Needs review