Posted by Igor Kandyba on October 30, 2008 at 10:13pm
Jump to:
| Project: | Subdomain |
| Version: | 6.x-1.4 |
| Component: | Miscellaneous |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
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
#1
I 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!
#2
I believe this is this problem
http://www.strainu.ro/programming/html/permission-denied-to-call-method-...
Hope that helps.
#3
@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.
#4
Fixed in HEAD. dev release should be out tomorrow.
Now works correctly with fivestar, plus1, flag, votingapi
#5
Automatically closed -- issue fixed for 2 weeks with no activity.
#6
Hi,
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!
#7
You 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.
#8
Thank 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!