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

Disabling period "range" in enabled_periods_API causes segment value suggestions to fail #10159

Open
mgonera opened this issue May 17, 2016 · 7 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc. Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement.

Comments

@mgonera
Copy link

mgonera commented May 17, 2016

Segment value suggestions are not working if enabled_periods_API doesn't have "range". No suggestions appear in the UI.

@adaqus
Copy link

adaqus commented May 18, 2016

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.

@mgonera
Copy link
Author

mgonera commented May 18, 2016

@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.

@adaqus
Copy link

adaqus commented May 18, 2016

I think it is plausible solution.

@mgonera
Copy link
Author

mgonera commented May 18, 2016

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.

@tsteur
Copy link
Member

tsteur commented May 22, 2016

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?

@gonerator
Copy link

I found out that the reason for suggestions failing was periods_API=range disabled. We simply enabled it back.

@mattab mattab added this to the 2.16.x (LTS) milestone May 27, 2016
@mattab mattab added Bug For errors / faults / flaws / inconsistencies etc. Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement. labels May 27, 2016
@mattab
Copy link
Member

mattab commented Aug 23, 2016

Maybe acceptable solution here would be to fetch suggestions for 'month' period?

@adaqus sounds good, or maybe even year period?

Pull request is very welcome :-)

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. Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement.
Projects
None yet
Development

No branches or pull requests

5 participants