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

filter_pattern is not decoded in search box #12005

Open
signalpoint opened this issue Sep 6, 2017 · 1 comment
Open

filter_pattern is not decoded in search box #12005

signalpoint opened this issue Sep 6, 2017 · 1 comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.

Comments

@signalpoint
Copy link

Piwik Version: 3.0.4

If I use the search box on a Custom Dimension to filter for two zip codes, for example: 75202|28203

This works properly and returns results like this screen shot...

screenshot from 2017-09-05 22-20-16

...and uses a URL like the one below:

https://piwik.example.com/index.php?date=2017-09-05&scopeOfDimension=visit&viewDataTable=table&idSite=1&period=month&disableLink=1&module=CustomDimensions&action=getCustomDimension&widget=1&moduleToWidgetize=CustomDimensions&actionToWidgetize=getCustomDimension&idDimension=1&filter_limit=15&filter_sort_column=nb_visits&filter_sort_order=desc&filter_column=label&filter_pattern=75202%7C28203

We can see that the filter_pattern query string parameter is equal to an encoded value of 75202%7C28203

Now if I try to load this widget via an iframe with the following URL...

https://piwik.example.com/index.php?idSite=1&date=2017-09-05&period=month&disableLink=1&module=Widgetize&action=iframe&widget=1&token_auth=abc123&moduleToWidgetize=CustomDimensions&actionToWidgetize=getCustomDimension&idDimension=1&filter_column=label&filter_pattern=75202%7C28203&filter_limit=15

We can see the filter_pattern is encoded with the same value of 75202%7C28203, but this yields no results, and from this screenshot you can see that the value in the search box is not properly decoded.

screenshot from 2017-09-05 22-33-02

Is this perhaps a bug, or am I using the API improperly via an iframe?

@mattab
Copy link
Member

mattab commented Sep 18, 2017

Thanks for the report @signalpoint. Yes, it is a bug. Although we didn't plan for you to do this (and don't yet have automated tests for it), it is an interesting and valid use case and should work.

@mattab mattab added the Bug For errors / faults / flaws / inconsistencies etc. label Sep 18, 2017
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