Voting_API seems to crash...it'll work on the site and then it'll stop working. And when it stops working, it causes the Views with that Voting API in to show blank views. I then go to edit the View to see what is going on and the Voting API fields saved in the View show as blank and when you look at the list of available fields to add, all the Voting API fields are not listed.

I leave the site for a while....come back....and the views work and fields are back in the list of fields to add.

....and then it'll crash again.

I looked in the log and there is a message that reads, "Illegal choice votingapi_vote_vote_percent.uid in field element"

CommentFileSizeAuthor
#2 Picture 4.png19.74 KBmdowsett

Comments

mdowsett’s picture

...there is this error as well:

Type	php
Date	Wednesday, April 8, 2009 - 21:50
User	Mark Dowsett
Location	http://www.weewelcome.ca/en/photo_contest
Referrer	http://www.weewelcome.ca/en/photo_contest/edit
Message	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 'DESC, votingapi_cache_vote_percent_average_value DESC LIMIT 0, 20' at line 1 query: SELECT DISTINCT(node.nid), value, votingapi_cache_vote_percent_average.value AS votingapi_cache_vote_percent_average_value, votingapi_cache_vote_percent_count.value AS votingapi_cache_vote_percent_count_value FROM node node WHERE (node.status = '1') AND (node.type IN ('image')) ORDER BY DESC, votingapi_cache_vote_percent_average_value DESC LIMIT 0, 20 in D:\WeeWelcome\htdocs\includes\database.mysql.inc on line 172.
mdowsett’s picture

StatusFileSize
new19.74 KB

attached is a screenshot of the missing View field (that is supposed to be a VotingAPI field). They come and go without any changes to the site...I've never seen this happen with a module before.

deviantintegral’s picture

I'm going to take a stab that the problem is this:

AND (node.type IN ('image')) ORDER BY DESC

I don't think that's valid; it probably needs to be something like this:

AND (node.type IN ('image')) ORDER BY <some database column> DESC

You can print a debug_backtrace() call on a testing copy right before line 172 in database.mysql.inc to determine what function is causing the problem: http://ca.php.net/debug_backtrace

mdowsett’s picture

I don't understand a thing on the php.net page you gave me...sorry.

I wouldn't know what command to run and where...

add1sun’s picture

Status: Active » Closed (duplicate)

We had the same problem. This issue seems to be a duplicate of #189311: votingapi_views.inc included in wrong place though.