GD Star rating is one of the best plugin to configure ratings for your wordpress posts. This time for me the plugin was showing issues and was not working when users try to rate.
The error that was thrown in firebug was
“Reference error jquery not defined gd star rating” , This error was pointing to gdsr.js which is a file inside the GD Star rating plugin that will allow a user to rate by clicking on STARS or THUMBS.

The error simply shows that there is some issue while loading the Jquery variable and the variable is not loaded properly.

The Solution / Fix
Check your website source through a browser or a file editing program and find where the JQUERY.JS file gets loaded. If it is loading after the gdsr.js then that is the issue. Modify the source so that you need to implement the code like this shown below

<script type='text/javascript' src='/wp-includes/js/jquery/jquery.js?ver=1.8.3'></script>
<script type='text/javascript' src='/wp-content/plugins/gd-star-rating/js/gdsr.js?ver=1.9.22'></script>

One more possibility is that the JQUERY.JS file gets loaded more than once and that might be causing some conflicts.

This will help to load the required jquery variables first before loading the gdsr.js file.

Leave a Reply

Your email address will not be published. Required fields are marked *