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
Report date to load by default doesn't work #7795
Comments
Hi @ohaucke |
Works for me. There's one thing that has changed regarding that so may be related: #7623 |
I can reproduce, you have to visit piwik in a new tab. |
The cause of the bug is here: https://github.com/piwik/piwik/blob/master/plugins/UsersManager/UserPreferences.php#L107 getDefaultDateWithoutValidation() sets the default value for the user preference to @mnapoli You've recently worked w/ this code, do you have any insights? |
How to reproduce:
Also
|
@benaka sorry I don't have an idea on the top of my head (can't look in details right now), I agree the code is really confusing and when I worked on that I didn't improve it much (probably not even at all) as the better solution we identified had a too high refactoring cost. |
@mnapoli Do you remember what the better solution was? |
@diosmosis not in details right now, we discussed it with @mattab. It involved handling period + date as a single entity (e.g. wrap them in a single concept/object), allowing for example to validate them both (e.g. this change is kinda in that spirit). Because some dates only make sense for some ranges, and some ranges only make sense for some dates, they are highly coupled. But needless to say it's a big change… |
Centralizing the query parameter logic in classes sounds like a good idea. Will be simple w/ DI. |
PR: #7814 |
Fixed by #7814 |
If i set "Report date to load by default" to "Current Month" and go back to the dashboard it shows me the report for today.
Reproduce:
Version: 2.13.0.
The text was updated successfully, but these errors were encountered: