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

Bug: getRowEvolution API-calls with format=php does not return serialized data by default #4115

Closed
anonymous-matomo-user opened this issue Sep 4, 2013 · 3 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc. worksforme The issue cannot be reproduced and things work as intended.
Milestone

Comments

@anonymous-matomo-user
Copy link

Documentation says:

"when you export in PHP format it is serialized by default (set serialize=0 to get the raw php data structure)"

see [http://piwik.org/docs/analytics-api/reference/]

But in Piwik_Api_ResponseBuilder Line 348 (see [https://github.com/piwik/piwik/blob/master/core/API/ResponseBuilder.php#L348] the default value is set to 0.

We reproduced this with getRowEvolution (see [http://demo.piwik.org/?module=API&method=API.getRowEvolution&idSite=7&period=range&date=2013-09-01,2013-09-15&apiModule=UserCountry&apiAction=getCountry&legendAppendMetric=1&labelUseAbsoluteUrl=1&format=PHP&token_auth=anonymous]).
When you pass serialize=1 it works. Just the default-handling is wrong

Maybe other functions are affected as well.

If this is not a bug and the result of getRowEvolution() should not be serialized by default, there should be a hint in the API-Reference.

@mattab
Copy link
Member

mattab commented Sep 6, 2013

Thanks for the report, a small inconsistency in the api.

@mattab
Copy link
Member

mattab commented Dec 26, 2013

I believe the bug is only with getRowEvolution API method correct? If so I can't think of a good way to fix it.... Marking as wontfix -- please pass &serialize=1 specifically to avoid any trouble

@anonymous-matomo-user
Copy link
Author

Yes, as far as I know, this bug only in getRowEvolution.

The resolution is OK for me, but I think this should be mentioned in the api-documentation as an exception.

This issue was closed.
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. worksforme The issue cannot be reproduced and things work as intended.
Projects
None yet
Development

No branches or pull requests

2 participants