
This is the first in the series of articles that will hopefully help you solve the problems that can cause plugin not to work. No matter how any plugin is written, plugin authors just can’t anticipate all the different enviroments and settings that one blog use. In some rare cases that can cause plugin to stop working or to cause other problems.
GD Star Rating works out of the box with default settings and in most cases there should be no problems. But there are number of things tha can go wrong. This is the first post that will try to point out the potential problems and offer a solution. This post will be about problems that are WordPress related: settings, invalid theme files and other plugins.
Before you post a support question about the rating plugin not working, please check these posts first. Read the user guide and check the forum because most likely the problem you have has already been solved. I will not reply to the question that are already answered.
1. Cross-domain
In the last few weeks I have received few complaints about plugin not working, only to find out that when you try to vote, Firebug reports an error in jQuery ajax call trying to send a request to another domain. The reason for that is that blog url was www.blogurl.com, but request for vote was sent to blogurl.com. This is considered cross-domain request and browser prevents the call. On the WordPress General Settings page you have two URL’s. They could be different, but in the case of rating plugin, you need to have both URL’s to be the same. This is just a quick solution for the problem. In one of the next versions, I will change the way URL for ajax calls is created.
Few weeks ago I have seen similar problem but this time URL was much different most likely cause by some hosting redirection settings, and URL for the blog and the URL where ajax calls were made are totally different. In that case there is nothing you can do through WordPress settings, you need to take a look at your hosting settings.
2. Invalid WordPress themes
For WordPress and many plugins to function, used theme must follow some rules. Most important this to include wp_head() function call in header.php file. I have seen quite a few themes that don’t follow some basic design rules, and are missing wp_head() or wp_footer() calls. These two are used by WordPress and many plugins to add custom javascript, css or tracking code. GD Star Rating plugin needs wp_head() call to add link to CSS file used to style the stars, and javascript needed to save the votes. There is no other way, theme must have wp_head() call.
3. Other plugins
In some rare cases, other plugins can cause rating plugin to stop working. Almost in every case problem is with javascript. jQuery code is usually added to be executed once the page is fully loaded. But if some other plugin’s jquery code is broken, it will prevent from executing all jQuery on load code.
There were few plugins that caused this problem, and most of them in newer versions have fixed the problem. I will not going to have an maintain the list of such plugins, but the only solution for such problem is to either upgrade that plugin (if the update is available) and hope that problem is fixed, or to disable it. Such problem will disable all other plugins that depend on jQuery not only GD Star Rating.
The easiest way to see if this is happening to your blog is to use Firefox with Firebug extension. For more details on this check out my post: Fix Your Blog: JavaScript problems.
4. Auto insert rating code problems
Plugin can insert rating block automatically. But in some cases this is not working. The problem is with post loop that is used to render posts. Some themes, to render posts on front page use excerpt of the post and not actual post content with more limiter. When WordPress renders excerpt it strips all HTML formating including DIV and all other tags that rating plugin adds to the rating block. GD Star Rating can’t add automatically rating block to excerpt call. If you want to show ratings on front page with theme that does that, you must modify the theme to use manual function call to render rating block after the excerpt call.
That’s it for now. I hope that you will find this useful, and you can expect more such posts. Next one will about GD Star Rating settings that could used incorrectly and prevent rating to work properly.
loading...




Comment Link
Very interesting article – you should mention this URL in the ReadMe.
loading...
Comment Link
New readme file will offer much more info then current one (if that’s even possible
). Also, at least two more similar posts will follow in the next few days.
loading...
Comment Link
Hi, first of all thanx for this plug-in. I’d love to know how to disable auto inserting rating system. I am looking for a way to insert the rating system only when i need.
thank you!
johhny
loading...
Comment Link
I am not going to repeat this anymore and I am not going to answer questions that have been answered who knows how many times before:
Read the user guide, check out the settings page, all settings are mostly self explanatory.
Please understand that I have very little free time, and I can’t waste that on answering the same things over and over agin.
loading...
Comment Link
I have a PROBLEM! I changed “Text to display:” and write “Vote for my posts” and i checked show header… but i can’t see my custom text over the stars.
Please help me !
loading...
Comment Link
That seams to be a bug, right now for some reason rating text is always passed as empty to render methods. It will be fixed soon.
loading...
Comment Link
Sorry that before i didn’t mention my environment, i use WordPress 2.7 with gd-star-rating.1.1.2 and in the field “Text to display:†i am writing a word in Greek (but as i see it’s ok since you are using UTF-8). So i will be glad when you fix it! Keep up the good work! You are helping the community. Cheers!
loading...
Comment Link
I can confirm now that this is a bug, nothing’s wrong with your setup. Fix will be available on SVN during the day.
loading...
Comment Link
Hi!
I just installed the plugin and it doesn’t work.
I get the voting stars (http://www.babyphoto.ro/blog/?p=60) at the buttom of my post, but you can not vote.
The error message I get in my wordpress admin is:
“For cache to work, plugin must be able to access cache folder. Plugin has tried to create folders needed and failed. Until you resolved this issue cache feature can’t be used.
Either make wp-content folder writeable or create gd-star-rating folder in wp-content and make it writeable. Use 0755 chmod setting.
”
The wp-content folder is set as writable.
Any ideas?
Thanks!
loading...
Comment Link
If you get the cache folder warning, than plugin can’t create it. This method uses php function to determine if the folder is writeable. Check again how the folder is set.
As for the first part about plugin not working, I know exactly what the problem is.
READ THIS: http://www.gdstarrating.com/2009/02/08/support-questions/
loading...
Comment Link
Hello Guru, what entice you to post an article. This article was extremely interesting, especially since I was searching for thoughts on this subject last Thursday.
loading...
Comment Link
Hi, I am not sure what is my problem and where to search.
The plugin is fantastic and works very good.
But I have a problem with it. When I install it lot’s of pages in my admin panel fail to load.
For example I am not able to load my posts panel or edit any of them. The page is just empty…
loading...
Comment Link
I am not sure what can be causing this. No reports of such behavior from any of the users until now. Plugin is loading stuff into admin page headers only for it’s own pages and some css for all others. I will need some more info. Check php or server log for errors that could be causing this. If you have such logs, you can send it to my email and I will check them out.
loading...
Comment Link
I have no Idea where to look for errors and log msg
loading...
Comment Link
Unfortunalty, without that I can’t help you. I need some response from the server to begin tracking the problem. And since I can’t reporduce problem, logs are only way to see what is the problem. If you use some shared hosting, it depens on the hosting company where these files are located, and you need to ask them to tell you where are they.
loading...
Comment Link
The plugin works fine, but on each of my posts it displays “UA:A [1.1.4_465]Rating: 4.0/5 (1 vote cast)” after the post description.
Is there an easy way to get rid of this?
View: http://www.whatyouhavingforyourtea.com for to what I mean…
loading...
Comment Link
Read the posts here, already answered: http://www.gdstarrating.com/2009/02/13/the-excerpt-problems/
loading...
Comment Link
I have a strange problem…
The plugin is mostly working… and I have a new icon set that I’ve implemented (so you know i’ve read the docs
.
My issue: mousing over the stars does nothing (I thought the plugin wans’t active for a long time). If, however, you move the mouse BELOW the star ratings, you can choose a rating.
E.G.
[* * * * * ]
* * * * *
* * * *
* * *
* *
*
This happens when I use the default sets as well as my own. What in the heck is going on?
loading...
Comment Link
Solution is very simple: in 99% of cases, when this happens the problem is caused by the theme. In your case theme is modifying A tag positioning and that’s screwing with rating stars. Line 241 in style.css of your theme is ‘#content .col01 .post-inner a’, and this adds ‘position: relative’, and because of this stars are displayed like they are. If you remove this positioning everything works fine. And also this will not going to chnage anything on your page as far as I can see.
loading...
Comment Link
Thank you, thank you, thank you!!! I’m not sure I would have ever figured this one out.
loading...
Comment Link
Sorry. The website is listed incorrectly in the previous post (there shouldn’t be a /test at the end of the URL). Damn autocomple.
loading...