Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Archive /

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

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

Disable statistics?


Go to End


13 Posts   6052 Views

Avatar
superautomatic

Community Member, 53 Posts

5 March 2008 at 3:56am

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

Avatar
mundgold

Community Member, 19 Posts

13 March 2008 at 3:15am

Hi, this worked for me - quick and dirty:

sapphire/core/control/ContentController.php
line 76 - public function init()

//Statistics::collect();

Avatar
superautomatic

Community Member, 53 Posts

27 March 2008 at 1:22am

Thanks!

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

Avatar
Liam

Community Member, 470 Posts

27 March 2008 at 5:58am

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?

Avatar
dio5

Community Member, 501 Posts

28 March 2008 at 3:26am

Edited: 28/03/2008 3:43am

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).

Avatar
Liam

Community Member, 470 Posts

28 March 2008 at 6:24am

Edited: 28/03/2008 7:08am

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',
)
));

Avatar
Ingo

Forum Moderator, 801 Posts

29 March 2008 at 4:32pm

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)

Avatar
NickJacobs

Community Member, 148 Posts

14 October 2008 at 10:10am

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?

Go to Top