Closed (fixed)
Project:
Subdomain
Version:
6.x-1.4
Component:
Miscellaneous
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
30 Oct 2008 at 22:13 UTC
Updated:
29 Oct 2011 at 15:01 UTC
Hello, I successfully installed and configured the module and was very happy until I looked at how Extra Voting Forms (and DrupalIt) began to work.
I created subdomains for users, so they now have aliases like user.domain.com. The problem appears when I`m trying to vote from user page, i.e. from user.domain.com. Karma Error: Communication (0) message box appears in Extra Voting Form and nothing at all appears in DrupalIt module, and my vote isnt successful.
So I`m not able to vote from subdomains.
If anyone can suggest something, please do it, cause the problem makes this fascinating module almost unusable for me :)
Thank you very much!
Comments
Comment #1
schturdark commentedI am also experiencing similar thing. I am using fivestar and fivestar extra module with subdomain module in my site. I got this message in firebug error console when I tried to vote:
[Exception... "'Permission denied to call method XMLHttpRequest.open' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "" data: no]
Is it because of the custom_url_rewrite_inbound used? I am not sure though...
Appreciate if anyone could help. Thanks a lot!
Comment #2
tiendoan commentedI believe this is this problem
http://www.strainu.ro/programming/html/permission-denied-to-call-method-...
Hope that helps.
Comment #3
setvik commented@tiendoan: thanks for the link.
Yeah, for security reasons, browsers freak when you attempt certain types of cross-domain javascript calls.
It can be fixed I believe, but the code that submits/retrieves votes via javascript in the different voting modules would need to be updated to use a type of cross-domain javascript technique called JSONP (http://docs.jquery.com/Ajax/jQuery.ajax).
I'll stick an issue in the fivestar queue and get some feedback from that module's maintainer.
Comment #4
setvik commentedFixed in HEAD. dev release should be out tomorrow.
Now works correctly with fivestar, plus1, flag, votingapi
Comment #6
funana commentedHi,
how did you fix it? We are not using the Subdomain module, but a custom solution via settings.php / .htaccess to have subdomains for users and their nodes. However, voting with the "Vote up/down" module fails on subdomained pages and - as far as I see now - flagging doesnt work too.
Could you explain the bug fix for me?
Thank you very much!
Comment #7
rwohlebYou need to make sure that any AJAX calls that are made by modules like vote up/down and flagging come from the same host as the current page. For example, you can't do AJAX from www.example.com if the current page is from user1.example.com. Browsers will block this for security reasons. The subdomain module selectively rewrites outbound URLs to adjust for this.
Comment #8
funana commentedThank you. I see... I thought there might be some work-around for this, let's say some kind of crossdomain.xml or so.
I will take a look into the subdomain.module code.
Thanks again!