I'm using rate module for voting. When an anonymous user clicks on the voting widget, the user is redirected to a url "user/login-to-rate". I'm also using i18n for localization. The issue with both of these together is that when I'm on a page with the URL "en/my-url" and I click on the voting widget, I'm redirected to "de/user/login-to-rate" where "de" is my default language. Ideally the user should be going to "en/user/login-to-rate" i.e. user selected language should be respected.
Going into details, I find that the rate module calls url function:
print url('user/login-to-rate', array('query' => $query, 'absolute' => TRUE));
and here there is no language paramater that is passed which means the default site language gets selected.
Am I missing something here in the configuration? Has anyone faced a similar problem and can help?
Comments
Comment #1
jose reyero commentedThat url() function should use the current language so I guess there's something wrong with either your language negotiation set up or the rate module.
Anyway, this module won't change anything about generated links, so moving to rate module.
Comment #2
mukesh.agarwal17 commentedIsn't i18n module responsible for converting all the calls to url() and l() functions to language specific urls? If yes, I think I'm missing on some configuration that could have helped me. Anyways, I dont think this should be an issue with rate module.
Comment #3
ivnishDrupal 7 is EOL. Issue will be closed