The ratings module works great. However, for some reason it very rarely gives me this error:
MySQL ERROR:
Error Number: 1064
Description: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '}' at line 1
Query: SELECT avatar_filename, avatar_width, avatar_height FROM exp_members WHERE member_id ={member_id}
The code above is my way of grabbing the avatar of the member that is posting the rating.
I did some troubleshooting and found the “rating entry” that was triggering this error. I noticed that this particular rating didn’t have a screenname associated with it. I am not sure why this happens sometimes, but it seems like every once in a while the rating module doesnt grab the users screenname. Then an error happens when the query above runs.
Deleting the erroneous comment fixes the error, however I would like to prevent this permanently. Any ideas?
<div id="title585"><H3 class="title">Submit Your Review</H3></div> <br> {if logged_in} <center> {screen_name}, Please let us know what you think of<br> {exp:weblog:entries weblog="{segment_1}" require_entry="yes"}{title}{/exp:weblog:entries}
Is there any chance that you have another form, or at one time, had a form that allowed Guest ratings?
Additionally, you should remove this parameter if you want only members Rating Entries (I know, you have the {if logged_in} conditional, just saying though:
require_membership="no"
I would also change {screen_name} to {logged_in_screen_name}, especially if you’re placing a Rating Form within a Weblog:Entries loop, as the variables will sometimes collide.
Thanks a million! I will try this out tonight. Good catch with the require membership parameter.
Another related question, you will notice that I have used a query to pull the avatar of each person who rated the track. Is there an easier way to do this - i.e. a standard variable.
I have even better news
We’ve delated the launch of Rating (yet one more time) to today.
Just as of yesterday, we’ve added a few more features, including full support for Member function such as Avatars, Photos, and Signatures.
It may not particular solve any “previous” issues, but if any of them are related to your current workaround, this should be the end to any new occurances