matomo-org / matomo

Empowering People Ethically with the leading open source alternative to Google Analytics that gives you full control over your data. Matomo lets you easily collect data from websites & apps and visualise this data and extract insights. Privacy is built-in. Liberating Web Analytics. Star us on Github? +1. And we love Pull Requests!
https://matomo.org/
GNU General Public License v3.0
19.32k stars 2.59k forks source link

[Bug] Account settings default reporting dates are not automatically archived #21816

Open peterbo opened 5 months ago

peterbo commented 5 months ago

What happened?

All Websites report takes a long time to load.

What should happen?

All websites dashboard should load quickly.

The configuration states: ; By default Matomo will automatically archive all date ranges any user has chosen in their account settings. ; This is limited to the available options last7, previous7, last30 and previous30.

This is obviously not the case, or this setting is only applied to the default website selected (and not all websites, that a user can access).

How can this be reproduced?

Use a bigger instance, because here, the effect will be more significant:

Matomo version

5.0.1

PHP version

8.1

Server operating system

Debian 11

What browsers are you seeing the problem on?

No response

Computer operating system

No response

Relevant log output

No response

Validations

sgiehl commented 5 months ago

@peterbo Looking at the code I guess your assumption is correct. Those configured default ranges seem only be archived for the default site if one is selected, or all sites if non was selected. See https://github.com/matomo-org/matomo/blob/2e3c5156818f5c3b986243870d02ff99c3319f2f/core/CronArchive.php#L1288-L1322

I guess we need to define the expected behavior here.