Closed (fixed)
Project:
Statistics Filter
Version:
master
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Jan 2006 at 02:42 UTC
Updated:
23 Apr 2006 at 08:30 UTC
The node counters are decremented when editing a node. I have compared the conditions behind the ones the statistics module increments the node counters and the way it is done by this module. There's a slight difference.
It is just a one liner and there's a patch pending here (a request though) that affects this module, so I do not post a patch.
The fix is, in the file statistics_filter.module, find this line:
if ((arg(0) == 'node') && arg(1)) {
and replace with this one:
if ((arg(0) == 'node') && is_numeric(arg(1)) && arg(2) == '') {
For reference, this is how the statistics module looks:
if (variable_get('statistics_count_content_views', 0)) {
// We are counting content views.
if ((arg(0) == 'node') && is_numeric(arg(1)) && arg(2) == '') {
// A node has been viewed, so update the node's counters.
db_query('UPDATE {node_counter} SET .....
Comments
Comment #1
mikeryanI'm not updating this module for 4.7, but if someone else cares to do it this patch does make sense.
Comment #2
markus_petrux commentedWithout this fix the node counter may end up into huge integer. Note that totalcount is defined as bigint(20) unsigned.
Comment #3
dan_aka_jack commentedI agree this patch is an important one.
The patch fixes this problem:
Insane number of page reads after a forum node is moved
Comment #4
mgiffordWorked for me..
So is someone going to commit the patch for 4.7?
Not sure, but it looked like the maintainer said he's not maintaining this module for 4.7..
Mike
Comment #5
t3rmin commentedWorks for me, too. Thanks.
Comment #6
deekayen commentedApplied to HEAD and DRUPAL-4-7.
Comment #7
(not verified) commented