-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide more debug information in system check #16350
Conversation
$results = []; | ||
|
||
if (SettingsPiwik::isMatomoInstalled()) { | ||
$results[] = DiagnosticResult::informationalResult('Browser Archiving Enabled', Rules::isBrowserTriggerEnabled()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fyi we don't really want to translate them likely cause it's mostly information for us... makes it easier to analyze things having it in english
$time = Date::now()->subDay($numDays)->getDatetime(); | ||
|
||
try { | ||
$row = Db::fetchOne('SELECT count(idsite) from ' . $table . ' where visit_last_action_time > ? LIMIT 1', $time ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could be wrong, but won't this still count every visit after the date? Should it be SELECT idsite FROM ... LIMIT 1
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great find, will fix that
$time = Date::now()->subDay($numDays)->getDatetime(); | ||
|
||
try { | ||
$row = Db::fetchOne('SELECT idsite from ' . $table . ' where visit_last_action_time > ? LIMIT 1', $time ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fyi @diosmosis I just realised this won't use an index. will provide a fix tmrw so it uses the index
fix #15931
Since we will run into few issues once people upgrade to Matomo 4 I reckon this will be actually quite valuable. It proved invaluable so far for any Matomo for WordPress problem. Eventually can add more like how "Diagnostics" plugin can already identify any customised config setting etc.