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

Loading an unarchived period might trigger error when visits log is disabled #19291

Open
sgiehl opened this issue May 30, 2022 · 4 comments
Open
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@sgiehl
Copy link
Member

sgiehl commented May 30, 2022

When the visits log is disabled globally or in website setting, loading reports for a period that has not yet been archived (without browser trigger), might currently show the error "Visits log is deactivated in website settings..."

The problem seems to be that the raw data check might try to perform a request to Live.getLastVisitsDetails in

return AjaxHelper.fetch({
method: 'Live.getLastVisitsDetails',
filter_limit: 1,
doNotFetchActions: 1,
});

That method is not available with deactivated visit log.

We should check if we can use or create another API method that provides the needed information, or maybe avoid the call completely if it doesn't make sense in that case.

@sgiehl sgiehl added the Bug For errors / faults / flaws / inconsistencies etc. label May 30, 2022
@sgiehl sgiehl added this to the For Prioritization milestone May 30, 2022
@tsteur
Copy link
Member

tsteur commented May 30, 2022

Nice find 👍 I actually ran into this issue recently and by the time I wanted to create a bug report I couldn't reproduce it anymore. Likely because data had been archived by then vs in the beginning it hadn't. And DEV-2830 is probably the same issue.

@tsteur
Copy link
Member

tsteur commented Aug 24, 2022

Ran into this one again a few times recently while looking at reports on the Cloud. Eg happens for me on https://demo-web.matomo.org/index.php?module=CoreHome&action=index&idSite=12&period=week&date=today#?idSite=12&period=day&date=2022-08-24&category=Goals_Goals&subcategory=8 when no data is archived yet.

image

@mattab
Copy link
Member

mattab commented Sep 15, 2022

Fixing this issue might fix #19736 so i'd suggest to schedule both at the same time.

@sgiehl
Copy link
Member Author

sgiehl commented Sep 15, 2022

A very quick fix for this and similar issues would be to introduce a new API method like getMostRecentVisitsDateTime. That would allow any part of Matomo to check if there are visits for the current period even if getLastVisitsDetails is disabled in config.

This could actually also be some performance improvement for those parts currently checking this using getLastVisitsDetails...

@mattab mattab modified the milestones: For Prioritization, 5.2.0 Jul 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

No branches or pull requests

3 participants