Closed (won't fix)
Project:
Advanced Poll
Version:
5.x-1.0-beta6
Component:
User interface (CSS, Images, etc.)
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
13 May 2008 at 21:26 UTC
Updated:
3 Feb 2013 at 20:06 UTC
Comments
Comment #1
leanazulyoro commentedanybody?
correct me if i'm wrong, but i believe it has something to do with the query used to list the polls:
$sql = "SELECT n.nid, n.title, p.active, n.created, c.value AS votes FROM {node} n INNER JOIN {advpoll} p ON n.nid = p.nid INNER JOIN {votingapi_cache} c ON n.nid = c.content_id WHERE n.status = 1 AND c.tag = '_advpoll' AND c.function = 'total_votes' AND c.content_type = 'advpoll' GROUP BY n.nid, n.title, p.active, n.created, c.value ORDER BY n.created DESC";
i'm lost here, i don't understan all the joins and groups in this query, but i believe here must be the key to what i'm pointing out, someone who is used to this kind of queries may please check this out?
thanks
Comment #2
leanazulyoro commentedPlease, i'd apretiate some help over here, i've looked around and found what i believe is the problem, and it's this query:
$sql = "SELECT n.nid, n.title, p.active, n.created, c.value AS votes FROM {node} n INNER JOIN {advpoll} p ON n.nid = p.nid INNER JOIN {votingapi_cache} c ON n.nid = c.content_id WHERE n.status = 1 AND c.tag = '_advpoll' AND c.function = 'total_votes' AND c.content_type = 'advpoll' GROUP BY n.nid, n.title, p.active, n.created, c.value ORDER BY n.created DESC";
it involves the {votingapi_cache} table, and since the recently created poll doesn't have any record in this table, then it doesn't return it. Now, i don't get quite along with all those INNER JOINs and ASs and ONs, so anyone who may help here would be apretiated. it's a small bug, but it can be anoying sometimes to HAVE TO vote in order for the poll to apear in the list.
Thanks in advance
Comment #3
leanazulyoro commentedone more efford to get some help around here, seriously, any help would do, please
Comment #4
leanazulyoro commentedwell, after some studing i found the solution to this:
I don't know how to make a patch, but this is what i added:
in the advpoll_insert() funtion in the .module after :
i added another query:
This is because the advpoll_page() function which lists all the polls, uses a query which looks for a record in the votingapi_cache table, this record gets inserted after a vote is summited, the above code inserts that record just after the node creation.
Comment #5
pomliane commentedThis version of Advanced Poll is not supported anymore. The issue is closed for this reason.
Please upgrade to a supported version and feel free to reopen the issue on the new version if applicable.
This issue has been automagically closed by a script.