I recently noticed that the two default views "last_viewed_block" and "popular_today_block" are no longer updating. I've cleared the cache for both Drupal and the Views module, but the blocks never update. Can anyone suggest a way to fix this?

Drupal core 6.19
Views 6.x-2.11

Comments

merlinofchaos’s picture

Make sure that the statistics collection in statistics module has not been disabled. There's a setting in the configuration for this.

rewted’s picture

Both access log and content views are enabled in admin/reports/settings. So this seems to be ok. Further suggestions?

merlinofchaos’s picture

Unfortunately I don't have any other thoughts.

dawehner’s picture

You should have a look whether the access log is still updated.

rewted’s picture

I believe this may have occurred after upgrading from Views 6.x-2.9 and up.

rewted’s picture

Yes the access log is also being updated.

dawehner’s picture

I believe this may have occurred after upgrading from Views 6.x-2.9 and up.

Did you verified this? This would propably a starting point to find the bug.

rewted’s picture

Did you verified this? This would probably a starting point to find the bug.
This was pure speculation, as I no longer have the error log. When transitioning to 6.x-2.11 from 6.x-2.10 I did notice some DB warnings in the event log. I've since reverted back to 6.x-2.10 (with same errors) and then back to 6.x-2.11 (no errors present).

Monitoring over night, I've noticed the content (listed nodes) in the default 'last viewed' block have changed. However, the 4 or the 5 listed have been the same for days. Surely people aren't going to the same pages time after time. With no cache enabled on the views, I'd expect them to update in near-real-time.

Do you know how often the default views refresh?

rewted’s picture

Perhaps I was wrong, the view is actually updating. However, it doesn't seem to update often. Does anyone know the default refresh for these two views?

p.s Caching is off, so I'd expect them to update in near real time.

rschwab’s picture

Component: Views Data » block displays
Priority: Major » Normal
Status: Active » Postponed (maintainer needs more info)

They should be updating on every page load.

Can you give us more information about your setup? A link and/or an attached export of your view would be a good starting point. Are you able to reproduce this on a clean install?

esmerel’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)
venusrising’s picture

Status: Closed (cannot reproduce) » Active

We too are now having this issue out of the blue. The popular Today view is no longer resetting to zero as it should. We have tried everything
Clear Views Data
Clear Cache
Run Cron
Access Logs are saving but the Daily Node count is not updating anymore.

We saw this article about views popular to lose timing
http://www.onyxbits.de/content/fixing-advancing-time-problem-drupals-pop...
If anyone has any ideas we would really appreciate it.

merlinofchaos’s picture

Views doesn't reset the data, it just reads the statistics module database. Statistics module updates it on cron.

Make sure the statistics configuration is set to record that data?

venusrising’s picture

Hello Merlin-
Thanks for the reply. We have the node count set, it was working fine until a few days ago and now the popular today count is not resetting like it should. I know Views is just pulling from the DB but I was not sure if anyone had the issue.

We just went to access log settings and noticed that enable access log was disabled not sure how this happened.
Disable access log is set to 1 week (we had 2 prior but it seemed excessive)
Node Count is set to on.
I have checked these so many times but just rechecked when you set make sure access log so hope that fixes it. Is there any way to a way to make sure that per the article that the Popular Today view does not lose time due to Drupal. Is this a myth or have you seen it before.
Thanks for your help and reply.

merlinofchaos’s picture

Status: Active » Fixed

Wow, I have no idea. It's hard to guess why that setting may have changed. :/

But Views probably isn't related. If that setting flips again it may be a core issue, or it may have just been user error at some point. No easy way to tell. :/

venusrising’s picture

Is there any way to manually reset the Today view without losing all node stats?

merlinofchaos’s picture

I don't think so. It just reads the value in node_counter.daycount -- that number ticks up as the hits are recorded. I think cron will reset that the first time it runs after the next day, but otherwise you probably have to wait or run a manual query to clean those values out.

venusrising’s picture

Thanks Merlin for the info

venusrising’s picture

Status: Fixed » Active

@merlinofchaos
If anyone has this issue. Try the little module attached to http://www.onyxbits.de/content/fixing-advancing-time-problem-drupals-pop...
fixed the time issue and worked great!

merlinofchaos’s picture

Status: Active » Closed (won't fix)

Why active? THere's nothing more we can do...