| Author |
Message |
Heya Im Me
Joined: 01 Feb 2006 Posts: 189
|
|
|
|
Hey Scott,
Sorry for not getting this up earlier, its the last 2 weeks of the semester so tests and papers are piling up.
Here is the problem, explaination, and a temporary solution (I say temporary because someone might come up with a different one)
PROBLEM
You are getting the annoying security error of Error: uncaught exception: Permission denied to call method XMLHttpRequest.open, which means the script is trying to call to an address that is not exactly reflecting the one in the address bar. XMLHttpRequest method is put under incredibly strict rules to ensure there are no security exploits in malicious sites using AJAX and I mean strict:
To understand how strict, it would be to better see if for youself:
Try going to http://www.tastypolls.com and submit a vote. You'll notice nothing will happen, it'll just say Saving...
Now try going tohttp://tastypolls.com and submit a vote. You'll notice something will happen this time; it will successfully save.
--------------------------------
EXPLANATION AND TEMPORARY SOLUTION
Explaination: The reason why this occurs is because in your CuteNews panel under System Settings, the main cutenews address (I'm betting) is set to http://tastypolls.com/ in all fields. This tells the script what your main address is, which is important for these AJAX plugins. This is fine for people visiting your site regularly so that's the reason why you probably neverminded the setting (neither did I until I realized this). Since there is no www in those fields the AJAX will not work if a person visits your site via http://www.tastypolls.com.
Temporary Solution: If you change it to http://www.tastypolls.com, then anyone who goes to that address will be able to vote via AJAX but if someone stumbles onto your site via http://tastypolls.com, it will not work for them.
For now, this is all I can offer to you in the form of help. Maybe there is some htaccess code that will always add www to the address if anyone ever visits with just http://tastypolls.com. I for one would like to know since I have mine all set to www in System Settings, so whenever I test my sites out via http://site.com, the AJAX does now work.
Hope this helps you out, Scott.
And FI-DD, any ideas on the htaccess code or something similar?
-HIM
|
|
| Wed May 02, 2007 4:16 am |
|
 |
Guest
|
|
|
Please login to hide the ads.
|
|
|
|
 |
scottdallas

Joined: 04 May 2006 Posts: 2027 Location: US |
|
|
|
You're right! When I played with system settings I found out how to adjust this. That's no problem though! What I'll do is forward www to http://tastypolls.com so everytime www is typed in it will automatically go to root domain and program system settings http://tastypolls.com...etc
Thanks for helpin me man.
I just tried it.. I wonder if that'll work. I'll have to scope out a way to append both domains to be accepted.
_________________ www.scodal.com is an example of cnr as a social forum - www.scottdizzle.com is an example of cnr as a personal website to share whatever cool stuff i feel like. i have another, but it's nsfw. pm me  |
|
| Wed May 02, 2007 6:26 pm |
|
 |
Heya Im Me
Joined: 01 Feb 2006 Posts: 189
|
|
|
|
How can you do forwarding like that without having an issue loading other pages in the root directory?
And np, I have to payback the community for the all help I've received and I know how annoying this ajax issue can be.
-HIM
|
|
| Wed May 02, 2007 7:23 pm |
|
 |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2857 Location: Germany |
|
|
| Thu May 03, 2007 5:59 pm |
|
 |
scottdallas

Joined: 04 May 2006 Posts: 2027 Location: US |
|
|
|
Thanks FI-DD I tried that but I think I'm .htaccess retarded. I had no .htaccess file so I made a new one and put it in the root directory of tastypolls.com by copy and pasting what you wrote. So I basically have a file with exactly the code you gave me in it called .htaccess but it doesn't do anything. Do I need to tell my site how to utilize this .htaccess file?
_________________ www.scodal.com is an example of cnr as a social forum - www.scottdizzle.com is an example of cnr as a personal website to share whatever cool stuff i feel like. i have another, but it's nsfw. pm me  |
|
| Thu May 03, 2007 8:21 pm |
|
 |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2857 Location: Germany |
|
|
|
The code above was meant for an already existing file.
If you have a new file try this:
 |  | RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^yourdomain.com$ [NC]
RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [L,NE,R=permanent] |
|
|
| Thu May 03, 2007 11:27 pm |
|
 |
scottdallas

Joined: 04 May 2006 Posts: 2027 Location: US |
|
|
|
That works. I is so happy. Thanks FI-DD!
_________________ www.scodal.com is an example of cnr as a social forum - www.scottdizzle.com is an example of cnr as a personal website to share whatever cool stuff i feel like. i have another, but it's nsfw. pm me  |
|
| Fri May 04, 2007 1:39 pm |
|
 |
scottdallas

Joined: 04 May 2006 Posts: 2027 Location: US |
|
|
|
Hey quick question. Can I make an XField set as drop down and put polls in it and then use this in my template to display polls in posts in different places throughout my short of full story template?
_________________ www.scodal.com is an example of cnr as a social forum - www.scottdizzle.com is an example of cnr as a personal website to share whatever cool stuff i feel like. i have another, but it's nsfw. pm me 
Last edited by scottdallas on Fri May 04, 2007 5:27 pm; edited 1 time in total |
|
| Fri May 04, 2007 4:06 pm |
|
 |
Heya Im Me
Joined: 01 Feb 2006 Posts: 189
|
|
|
|
Thanks, FI-DD!!!!!!!!!!!!!!!!!!!!!!!
|
|
| Fri May 04, 2007 4:06 pm |
|
 |
Goberg
Joined: 18 Jan 2007 Posts: 43
|
|
|
|
I get this error message when i go to the news that i just saved with a poll question:
 |  | Warning: Invalid argument supplied for foreach() in /home/sistestopp/web/sistestopp.com/cms/plugins/polls-in-posts.php on line 199
Warning: Invalid argument supplied for foreach() in /home/sistestopp/web/sistestopp.com/cms/plugins/polls-in-posts.php on line 176 |
If i want to edit the news article with the poll i get this message just over the full story textarea:
 |  | Warning: Invalid argument supplied for foreach() in /home/sistestopp/web/sistestopp.com/cms/plugins/polls-in-posts.php on line 95 |
also, everything i write between [poll] and [/poll] gets deleted
|
|
| Wed May 09, 2007 1:27 pm |
|
 |
RAMMSTEIN12

Joined: 06 May 2007 Posts: 29 Location: Greece |
|
|
|
 |  | I get this error message when i go to the news that i just saved with a poll question:
 |  | Warning: Invalid argument supplied for foreach() in /home/sistestopp/web/sistestopp.com/cms/plugins/polls-in-posts.php on line 199
Warning: Invalid argument supplied for foreach() in /home/sistestopp/web/sistestopp.com/cms/plugins/polls-in-posts.php on line 176 |
If i want to edit the news article with the poll i get this message just over the full story textarea:
 |  | Warning: Invalid argument supplied for foreach() in /home/sistestopp/web/sistestopp.com/cms/plugins/polls-in-posts.php on line 95 |
also, everything i write between [poll] and [/poll] gets deleted |
I have The same problem to
_________________ MAKE CUTENEWS BETTER
my cutenews site: www.Down66.com |
|
| Sun May 13, 2007 9:18 am |
|
 |
Geahn

Joined: 13 Mar 2007 Posts: 15
|
|
|
|
I'm Lost in this code, my site show this error:
 |  | Warning: Invalid argument supplied for foreach() in /home/fansites/public_html/pbmania/cnr/plugins/polls-in-posts.php on line 78 |
I don't say about the poll, it don't show. What I doing? Plz, help me.
|
|
| Wed Jun 20, 2007 2:07 pm |
|
 |
scottdallas

Joined: 04 May 2006 Posts: 2027 Location: US |
|
|
|
That looks like the error when you haven't properly installed/configured/uploaded the plugin.. it's saying it can't find it to use it.
_________________ www.scodal.com is an example of cnr as a social forum - www.scottdizzle.com is an example of cnr as a personal website to share whatever cool stuff i feel like. i have another, but it's nsfw. pm me  |
|
| Wed Jun 20, 2007 3:24 pm |
|
 |
Partyism
Joined: 25 Sep 2007 Posts: 301
|
|
|
|
Doesnt work for me either
Warning: Invalid argument supplied for foreach() in /home/sistestopp/web/sistestopp.com/cms/plugins/polls-in-posts.php on line 199
Warning: Invalid argument supplied for foreach() in /home/sistestopp/web/sistestopp.com/cms/plugins/polls-in-posts.php on line 176
|
|
| Tue Nov 13, 2007 3:12 pm |
|
 |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2857 Location: Germany |
|
|
|
Don't know what's wrong. I just tested it on a fresh installation, and it's working great for me...
|
|
| Fri Nov 16, 2007 11:20 am |
|
 |
|