Forum Index
RegisterSearchFAQMemberlistUsergroupsLog in
Polls in posts
Goto page Previous  1, 2, 3, 4, 5  Next
 
Reply to topic    Forum Index » Additional Downloads View previous topic
View next topic
Polls in posts
Author Message
Heya Im Me



Joined: 01 Feb 2006
Posts: 189

Post Reply with quote
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? Wink





-HIM
Wed May 02, 2007 4:16 am View user's profile Send private message
Guest








Please login to hide the ads.

scottdallas



Joined: 04 May 2006
Posts: 2027
Location: US

Post Reply with quote
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 Wink
Wed May 02, 2007 6:26 pm View user's profile Send private message Visit poster's website AIM Address
Heya Im Me



Joined: 01 Feb 2006
Posts: 189

Post Reply with quote
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 View user's profile Send private message
FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2857
Location: Germany

Post Reply with quote
Code:
RewriteCond %{HTTP_HOST} ^yourdomain.com$ [NC]

RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [L,NE,R=permanent]




Put this in your .htaccess file and it'll redirect http://yourdomain.com to http://www.yourdomain.com.
Thu May 03, 2007 5:59 pm View user's profile Send private message
scottdallas



Joined: 04 May 2006
Posts: 2027
Location: US

Post Reply with quote
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 Wink
Thu May 03, 2007 8:21 pm View user's profile Send private message Visit poster's website AIM Address
FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2857
Location: Germany

Post Reply with quote
The code above was meant for an already existing file.



If you have a new file try this:

Code:
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 View user's profile Send private message
scottdallas



Joined: 04 May 2006
Posts: 2027
Location: US

Post Reply with quote




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 Wink
Fri May 04, 2007 1:39 pm View user's profile Send private message Visit poster's website AIM Address
scottdallas



Joined: 04 May 2006
Posts: 2027
Location: US

Post Reply with quote
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 Wink

Last edited by scottdallas on Fri May 04, 2007 5:27 pm; edited 1 time in total
Fri May 04, 2007 4:06 pm View user's profile Send private message Visit poster's website AIM Address
Heya Im Me



Joined: 01 Feb 2006
Posts: 189

Post Reply with quote
Thanks, FI-DD!!!!!!!!!!!!!!!!!!!!!!!
Fri May 04, 2007 4:06 pm View user's profile Send private message
Goberg



Joined: 18 Jan 2007
Posts: 43

Post Reply with quote
I get this error message when i go to the news that i just saved with a poll question:



Code:
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:



Code:
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 View user's profile Send private message
RAMMSTEIN12



Joined: 06 May 2007
Posts: 29
Location: Greece

Post Reply with quote
Goberg wrote:
I get this error message when i go to the news that i just saved with a poll question:



Code:
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:



Code:
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 View user's profile Send private message Visit poster's website
Geahn



Joined: 13 Mar 2007
Posts: 15

Post Reply with quote
I'm Lost in this code, my site show this error:

Code:
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 View user's profile Send private message
scottdallas



Joined: 04 May 2006
Posts: 2027
Location: US

Post Reply with quote
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 Wink
Wed Jun 20, 2007 3:24 pm View user's profile Send private message Visit poster's website AIM Address
Partyism



Joined: 25 Sep 2007
Posts: 301

Post Reply with quote
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 View user's profile Send private message
FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2857
Location: Germany

Post Reply with quote
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 View user's profile Send private message
Display posts from previous:    
Reply to topic    Forum Index » Additional Downloads All times are GMT + 1 Hour
Goto page Previous  1, 2, 3, 4, 5  Next
Page 2 of 5

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum



Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Music Lyrics.