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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Number of site displays


Go to End
Reply


20 Posts   2320 Views

Avatar
sebastiankozub

Community Member, 40 Posts

5 November 2010 at 11:43am

page
page_live
page_versions

all those tables have everywhere visits = 0 :/

Avatar
sebastiankozub

Community Member, 40 Posts

6 November 2010 at 9:03am

I created:

public static $db = array(
'ShowInTopMenu' => 'Boolean',
'ShowInLeftMenu' => 'Boolean',
'ShowInLeftMenu2' => 'Boolean',
'visits' => 'Int'
);

in class Page and:

$this->visits++;
$this->write();

in class Page_Controller. Is $this->visits++ correct operation to increment 'visits' in $db?

Avatar
sebastiankozub

Community Member, 40 Posts

9 November 2010 at 5:36am

Anybody see the mistake?

Avatar
bartvanirsel

Community Member, 96 Posts

9 November 2010 at 9:51am

What do you see when debugging SQL using ?showqueries=1 ?

Avatar
sebastiankozub

Community Member, 40 Posts

9 November 2010 at 7:50pm

I see nothing, when I am logged page is opening but no warnings and error show

Avatar
bartvanirsel

Community Member, 96 Posts

9 November 2010 at 9:09pm

Do you see queries for incrementing Visits there?

Avatar
sebastiankozub

Community Member, 40 Posts

10 November 2010 at 1:03am

Do I have to be logged as Admin?
I can't see any difference between page with ?showqueries=1 and page without it

Avatar
bartvanirsel

Community Member, 96 Posts

10 November 2010 at 1:13am

you need to be logged in as admin, and maybe the domain should be in dev servers list