Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
Looking at the acidfree table, visits are being recorded in the votes column.
From acidfree.module:
from function acidfree_view:
line 1047: acidfree_add_vote($node);
function acidfree_add_vote(&$node) {
if (!isset($node->nid))
return;
$query = "UPDATE {acidfree} SET votes=(votes+1) WHERE aid={$node->nid}";
db_query($query);
}
Every time a node is visited, _add_vote is called to update the votes column, instead of updating 'visited'.
Made the following change:
line 1047: acidfree_add_visit($node);
And ADDED the following function:
function acidfree_add_visit(&$node) {
if (!isset($node->nid))
return;
$query = "UPDATE {acidfree} SET visited=(visited+1) WHERE aid={$node->nid}";
db_query($query);
}
Now visits are correctly logged in the 'visited' column of table acidfree.
Not sure if this will affect the voting issue, though.
the whole votes and visited thing was a mistake I made long ago. You could probably just remove all references to votes and visited and be just fine. But since I can't really remove them in the distribution for fear of breaking existing setups, you will have to remove them in your setup manually.
Also, if tom611 or others are still having problems, they might want to try with the current cvs version of Voting. There were known issues interfering with the voting module showing up in certain circumstances.
Comments
Comment #1
vhmauery commentedwhy don't you ask the voting module folks?
Comment #2
cowb0y commentedLooking at the acidfree table, visits are being recorded in the votes column.
From acidfree.module:
from function acidfree_view:
line 1047: acidfree_add_vote($node);
function acidfree_add_vote(&$node) {
if (!isset($node->nid))
return;
$query = "UPDATE {acidfree} SET votes=(votes+1) WHERE aid={$node->nid}";
db_query($query);
}
Every time a node is visited, _add_vote is called to update the votes column, instead of updating 'visited'.
Made the following change:
line 1047: acidfree_add_visit($node);
And ADDED the following function:
function acidfree_add_visit(&$node) {
if (!isset($node->nid))
return;
$query = "UPDATE {acidfree} SET visited=(visited+1) WHERE aid={$node->nid}";
db_query($query);
}
Now visits are correctly logged in the 'visited' column of table acidfree.
Not sure if this will affect the voting issue, though.
Jay
Comment #3
tom611 commentedWow, is this as serious as it sounds? Could this be why my voting module is no longer displaying? Please reply!
Comment #4
vhmauery commentedthe whole votes and visited thing was a mistake I made long ago. You could probably just remove all references to votes and visited and be just fine. But since I can't really remove them in the distribution for fear of breaking existing setups, you will have to remove them in your setup manually.
Comment #5
drawk commentedAlso, if tom611 or others are still having problems, they might want to try with the current cvs version of Voting. There were known issues interfering with the voting module showing up in certain circumstances.