Skip to content
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

Merged
merged 20 commits into from Sep 2, 2020
Merged

Provide more debug information in system check #16350

merged 20 commits into from Sep 2, 2020

Conversation

tsteur
Copy link
Member

@tsteur tsteur commented Aug 28, 2020

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.

@tsteur tsteur added the Pull Request WIP Indicates the current pull request is still work in progress and not ready yet for a review. label Aug 28, 2020
@tsteur tsteur added this to the 4.0.0 milestone Aug 28, 2020
@tsteur tsteur added Needs Review PRs that need a code review and removed Pull Request WIP Indicates the current pull request is still work in progress and not ready yet for a review. labels Aug 28, 2020
$results = [];

if (SettingsPiwik::isMatomoInstalled()) {
$results[] = DiagnosticResult::informationalResult('Browser Archiving Enabled', Rules::isBrowserTriggerEnabled());
Copy link
Member Author

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

@tsteur tsteur added Pull Request WIP Indicates the current pull request is still work in progress and not ready yet for a review. and removed Needs Review PRs that need a code review labels Aug 30, 2020
@tsteur tsteur added Needs Review PRs that need a code review and removed Pull Request WIP Indicates the current pull request is still work in progress and not ready yet for a review. labels Aug 30, 2020
$time = Date::now()->subDay($numDays)->getDatetime();

try {
$row = Db::fetchOne('SELECT count(idsite) from ' . $table . ' where visit_last_action_time > ? LIMIT 1', $time );
Copy link
Member

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?

Copy link
Member Author

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

@diosmosis diosmosis merged commit 11f54ee into 4.x-dev Sep 2, 2020
@diosmosis diosmosis deleted the m15931 branch September 2, 2020 07:02
$time = Date::now()->subDay($numDays)->getDatetime();

try {
$row = Db::fetchOne('SELECT idsite from ' . $table . ' where visit_last_action_time > ? LIMIT 1', $time );
Copy link
Member Author

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

@mattab mattab added the not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. label Sep 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add more information to system check and be able to copy/paste for debugging purposes
3 participants