ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Problem with stats module after upgrade to 1.6.9

July 21, 2010 8:42pm

Subscribe [3]
  • #1 / Jul 21, 2010 8:42pm

    Phoebe

    58 posts

    I recently did 3 years of upgrades to 1.6.9 and one of the strange things that happened was sporadic problems with the stats module.

    The symptoms were the same as in this thread: http://ellislab.com/forums/viewthread/154385/ ane the problem was coming when I was calling a plugin.

    The problem seems to be that this line in the stats module:

    $weblog_id = (USER_BLOG !== FALSE) ? UB_BLOG_ID : 0;

    Was returning 0 and as the exp_stats table was empty it was failing further down.  I’ve added a new record for all my existing weblog_ids and one for 0 and it works, but I suspect this is a bit of a bodge! 

    Is there another setting somewhere I need to change?

  • #2 / Jul 22, 2010 12:31pm

    Sue Crocker

    26054 posts

    Which plugin was this happening with?

  • #3 / Jul 23, 2010 5:04am

    Phoebe

    58 posts

    This was a custom plugin which went and got some data and output it and was pretty much the only thing on this page apart from headers and footers.  Interestingly, I got the error whether I had the stats module installed or no.  Dug out an old backup and the only record in there is for weblog = 0, so I guess that was the solution.  Just leaves the mystery of how the record got deleted!

  • #4 / Jul 23, 2010 4:31pm

    Brandon Jones

    5500 posts

    To clarify, the issue is that your exp_stats table was empty? Is it still empty currently?

  • #5 / Jul 23, 2010 6:08pm

    Phoebe

    58 posts

    Added a record to my stats table and everything finally started working (having had same symptoms as in thread referenced above).  But just to make sure I was not making an idiot of myself I tried emptying the stats table, and it still works.  BUT there was a record in the stats table in a backup from six months ago and there was NOT a record in the stats table after doing the upgrade.  So not sure what to say about that. 

    My system is working now, with or without the stats record.

  • #6 / Jul 23, 2010 7:17pm

    Brandon Jones

    5500 posts

    For good measure you might want to repair that table if you encounter issues in the future. Glad everything is working now - don’t hesitate to post again.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases