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
Disabling period "range" in enabled_periods_API causes segment value suggestions to fail #10159
Comments
The reason why 'range' period is needed is that API.getSuggestedValuesForSegment calls Live.getLastVisitsDetails for last 60 days to get typical values from visits log for suggestions: https://github.com/piwik/piwik/blob/master/plugins/API/API.php#L608 Maybe acceptable solution here would be to fetch suggestions for 'month' period? Then 'range' period could be still locked and suggestions would work. |
@adaqus maybe we could make it configurable and it should depend on the periods that are enabled and available in API? in this particular case "last90" would be best to use if possible because this is segment processing configuration. |
I think it is plausible solution. |
For anyone who finds this in the future: maybe this could be adjusted basing on current configuration of periods availability. We found out what we need and we got it working without any major changes, but this issue may come up for some users. |
We could change the time to look back based on enabled periods, that should be doable. @mgonera what did you find out and how did you get it working? |
I found out that the reason for suggestions failing was periods_API=range disabled. We simply enabled it back. |
@adaqus sounds good, or maybe even Pull request is very welcome :-) |
Segment value suggestions are not working if enabled_periods_API doesn't have "range". No suggestions appear in the UI.
The text was updated successfully, but these errors were encountered: