I am having problems with the Most Popular Content not updating. Any suggestions.. Here is the link to my site:
http://www.freeonlineresearchpapers.com/hof

Also, can anyone give me some direction on how to install these patches

http://drupal.org/node/28898

http://drupal.org/node/25419

Thanks!

keto

Comments

syscrusher’s picture

Assigned: Unassigned » syscrusher

I've not seen this issue before, but we can work together to solve it.

Line 440 has the query that finds the most popular nodes. You may want to take a look at the actual executed SQL, which you can obtain (on a test basis) by changing db_query() to db_queryd() in line 441, so that the SQL statements echo to the browser. If you can try those against your database (they are just SELECT statements, won't actually modify your data), and see what you get, this should tell us what's going on.

Scott

keto-1’s picture

Scott, i appreciate you offering to help on this situation and sorry it has taken me so long to reply to your post. OK, so in the hof.module I changed line 441 to $result = db_queryd($sql);

that resulted in the following message on /hof page

query: select n.nid,n.title,c.totalcount from node n left join node_counter c on n.nid=c.nid where n.status=1 and n.created>=1125984459 and c.totalcount>1 and title not like '%page not found%' order by c.totalcount desc, n.created desc limit 5
error:

query: select n.nid,n.title,c.totalcount from node n left join node_counter c on n.nid=c.nid where n.status=1 and n.created>=1123910859 and c.totalcount>1 and title not like '%page not found%' order by c.totalcount desc, n.created desc limit 5
error:

query: select n.nid,n.title,c.totalcount from node n left join node_counter c on n.nid=c.nid where n.status=1 and n.created>=1095053259 and c.totalcount>1 and title not like '%page not found%' order by c.totalcount desc, n.created desc limit 5
error:

query: select n.nid,n.title,c.totalcount from node n left join node_counter c on n.nid=c.nid where n.status=1 and n.created>=0 and c.totalcount>1 and title not like '%page not found%' order by c.totalcount desc, n.created desc limit 5
error:

I hope I did what you asked correctly.

Thanks!

keto-1’s picture

ok, so I really didnt get anywhere the HOF module and was hoping that the new module release would fix the issues that I have had. However, no such luck.

From phpmyadmin I have ran the following query.

SELECT n.nid, n.title, c.totalcount FROM node n left join node_counter c on n.nid=c.nid where n.status=1 and n.moderate=0 and n.created>=0 and c.totalcount>1 and title not like '%page not found%' order by c.totalcount desc, n.created desc limit 5

This is what returned:

MySQL returned an empty result set (i.e. zero rows). (Query took 0.0004 sec)
SQL query:
SELECT n.nid, n.title, c.totalcount
FROM node n
LEFT JOIN node_counter c ON n.nid = c.nid
WHERE n.status =1
AND n.moderate =0
AND n.created >=0
AND c.totalcount >1
AND title NOT LIKE '%page not found%'
ORDER BY c.totalcount DESC , n.created DESC
LIMIT 5

Any help or suggestions would be greatly appreciated!

- Keto

Doobyfrucan’s picture

Version: master » 5.x-1.0

I'm having the same issue with Most Popular Content not updating. Was this ever resolved or worked around?

Any info would be greatfully appreciated.

syscrusher’s picture

Status: Active » Fixed

I found the cause of this, and why I couldn't replicate it in my test environment. The statistics fail to update if you have disabled node view counting, or turned off the statistics module (which actually does the counting). If these had previously been enabled, there can be data in the node_counter table, so statistics appear but don't update. Otherwise they are simply missing.

A patch has been committed. Download version 5.x-1.1 or later, and this problem should be fixed. The module will now warn you if your configuration doesn't include the prerequisite module and settings.

Sorry this took so long to fix. It never occurred to me to disable something that I knew my module needed; I was looking for a code bug instead.

Syscrusher

killes@www.drop.org’s picture

Status: Fixed » Closed (fixed)
blueflowers’s picture

I seem to be having the same problem with 5.x-1.1

I too didn't have statistics running properly (the way you've described). I disabled and re-enabled HOF as well as statistics and I'm still getting nothing.

Any ideas or advice?

burgs’s picture

I just had the same issue, and had to revert the view back to it's original state.

avpaderno’s picture

Assigned: » Unassigned
Issue summary: View changes