page
page_live
page_versions
all those tables have everywhere visits = 0 :/
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
page
page_live
page_versions
all those tables have everywhere visits = 0 :/
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?
Anybody see the mistake?
What do you see when debugging SQL using ?showqueries=1 ?
I see nothing, when I am logged page is opening but no warnings and error show
Do you see queries for incrementing Visits there?
Do I have to be logged as Admin?
I can't see any difference between page with ?showqueries=1 and page without it
you need to be logged in as admin, and maybe the domain should be in dev servers list