Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Disable statistics?

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Page: 1 2
Go to End
Author Topic: 5392 Views
  • superautomatic
    Avatar
    Community Member
    53 Posts

    Disable statistics? Link to this post

    Hi, I'd like to disable statistics logging, but I can't find any information on how to do that. Suggestions?

  • mundgold
    Avatar
    Community Member
    19 Posts

    Re: Disable statistics? Link to this post

    Hi, this worked for me - quick and dirty:

    sapphire/core/control/ContentController.php
    line 76 - public function init()
          
    //Statistics::collect();

  • superautomatic
    Avatar
    Community Member
    53 Posts

    Re: Disable statistics? Link to this post

    Thanks!

    I'm really starting to think that Silverstripe needs a basic control panel for stuff like this.

  • Liam
    Avatar
    Community Member
    470 Posts

    Re: Disable statistics? Link to this post

    Great tip. I agree that having a settings page would be nice, but it goes against what the developers want SS to be according to one of the pages in the community section.

    Is there a way to remove the stats link all together in the admin panel?

  • dio5
    Avatar
    Community Member
    501 Posts

    Re: Disable statistics? Link to this post

    I really think statistics should be a module apart from the standard package. Most people will might want to use other tools for that anyway and last time I checked the stat section was broken, i.e. getting huge out of memory errors (bug's already reported).

  • Liam
    Avatar
    Community Member
    470 Posts

    Re: Disable statistics? Link to this post

    I would agree and I believe it is happening. I remember reading that the Stats and NewsLetter will become modules and removed from the core.

    *Edit* Oh, and I found out how to remove it or any link from the admin panel from the good ol' documentation.

    Add this to your mysite/_config.php file. Make sure you disable it first, or it'll still log everything and make your database larger.

    Object::addStaticVars('LeftAndMain', array(
    'removed_menu_items' => array(
          'statistics',
       )
    ));

  • Ingo
    Avatar
    Forum Moderator
    801 Posts

    Re: Disable statistics? Link to this post

    its in the works, statistics will be an optional module thats not distributed with the core starting from 2.2.3 (see http://open.silverstripe.com/ticket/2145#comment:2)

  • NickJacobs
    Avatar
    Community Member
    144 Posts

    Re: Disable statistics? Link to this post

    Hi, can this method (LeeUm above) be used to remove other menu items, ie Newsletters?

    I tried this:

    Object::addStaticVars('LeftAndMain', array(
    'removed_menu_items' => array(
    'statistics','newsletters',
    )
    ));

    but it didn't work...any ideas?

    5392 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.