Fork me on GitHub

statistics v5 not working  Bottom

  • Greetings,
    I've noticed over the last few weeks that stats v5 isn't working. Nothing is crashing (or has crashed) and the program seems to behave as it should. The one error I have found is that when I go to admin the module, when I click on parameter confiugration, I get this error:

    Quote

    Notice: Use of undefined constant _MONTH - assumed '_MONTH' in /home/halfoxid/public_html/modules/statistics/pnadmin.php on line 86

    Notice: Use of undefined constant _MONTH - assumed '_MONTH' in /home/halfoxid/public_html/modules/statistics/pnadmin.php on line 86

    Notice: Use of undefined constant _MONTH - assumed '_MONTH' in /home/halfoxid/public_html/modules/statistics/pnadmin.php on line 86

    The rest of the page loads so I don't know if this indicates something that I've done wrong. I also did see that coldrolledsteel suggested that a previous poster email him directly and I didn't think I should presume to email him directly.
    Thanks for you help,
    jamaicabob
  • There's no need to e-mail him directly if you take a look at his site.

    -Mark

    --
    Visit My homepage and Zikula themes.
  • Thanks. I guess my only question would be where I should place that code...
    jb
    p.s. The other question would be if that error would be causing the statistics module to no longer keep track of stats...
  • jamaicabob

    Thanks. I guess my only question would be where I should place that code...
    jb


    Try reading the article....

    -Mark

    --
    Visit My homepage and Zikula themes.
  • I just clicked three times on the title and no more of the text appeared. Here is what the article says

    Quote

    It appears that there's been a bug in the admin portion of statistics since the beginning. Until I get a new module released, you can fix it by editing modules/statistics/pnlang/eng/admin.php and adding the line:

    define('_MONTH','Month');

    There isn't a 'read more' or anything else that would indicate where to find that detail...
  • Just found my oversight. I needed to add to admin.php in the eng directory where all the definitions are.
    Thanks and my apologies for my oversight.
    jb
    p.s. Again, my question will be, why isn't the site recording any hits. How I know is that in the prose summary, there isn't even a zero infront of yesterday and today. I would take that to mean it doesn't know how or what to display. I do know I'm getting hits because I'm getting emails sent to me from the site.
  • Quoting from the article.... we have

    you can fix it by editing modules/statistics/pnlang/eng/admin.php and adding the line:

    define('_MONTH','Month');


    This tells you exactly what to add and to what file.

    -Mark

    --
    Visit My homepage and Zikula themes.
  • Mark,
    I realize that because I did an edited post instead of a quick reply you might have realized that I did catch my oversight. The problem of the module not taking stats still exists, though, so I thougtht I'd post a reply so that I could re-state the existing malfunction is still there.
    Thanks,
    jamaicabob
  • I'd posted back at the same time you'd spotted the detail in the article.... ;). The module needs an addition to pnAPI.php for it to be able to function. Take a look at the docs supplied with the module.

    -Mark

    --
    Visit My homepage and Zikula themes.
  • Mark,
    Here's what I've learned. Somewhere along the line I must have re-installed the pnAPI.php because the statistics mod had been working and keeping stats just fine. Of course, I'm using enough third-party mods that one of them could have reinstalled the pnAPI.php file and I wouldn't have remembered this detail. I can't wait until there is a listing of mods with the implications of using them. It would be great to have a column that says "rewrites ******" then you could look to see which ones you have that do that and in which order they were installed to know how to counteract any disabling effects.
    Thanks for your patience-to-newbie,
    jamaicabob
  • In this case the statistics module will replace the core stats and referrers module for .8x so it won't be a problem. In general a module should not alter the core - this is one of the goals for PN.

    -Mark

    --
    Visit My homepage and Zikula themes.
  • Mark, thanks for responding to this. Get out into real life and see what happens?

    jamaicabob, feel freee to email me with any of your support questions to crs AT mtrad DOT com.

    And, yeah, I don't like hacking the pnAPI.php file either. Most of the support requests that I get are related to folks mistakenly over-writing it. Unfortunately, there's no other way to collect the statistics....

This list is based on users active over the last 60 minutes.