Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Evolution ImageGraph is not working for Referers.getAll #3887

Closed
tsteur opened this Issue · 6 comments

3 participants

@tsteur
Owner

When opening the Referers.getAll evolution graph I'm getting the following error message:

API returned an error. Referers.getAll with multiple sites or dates is not supported (yet).

Link to reproduce:
http://demo.piwik.org/?module=API&method=ImageGraph.get&idSite=7&period=day&date=last7&apiModule=Referers&apiAction=getAll&outputType=0&showLegend=1&fontSize=9&aliasedGraph=1&legendAppendMetric=1&format=JSON&token_auth=anonymous

Link to file:
https://github.com/piwik/piwik/blob/master/plugins/Referers/API.php#L113

To fix this issue, Referrers.getAll should either support multiple dates/websites or MetadataAPI should not return an imageGraphEvolutionUrl for this report, see:

http://demo.piwik.org/?module=API&method=API.getProcessedReport&idSite=7&period=day&date=today&apiModule=Referers&apiAction=getAll&showTimer=1&format=JSON&token_auth=anonymous

@mattab
Owner

+1 for "MetadataAPI should not return an imageGraphEvolutionUrl for this report"

@mattab
Owner

In 2d5b0ac: Fixes #3887
Hiding row evolution graph URL from output for Referrer.getAll
Please double test it's all working!

@JulienMoumne
Collaborator

I am not sure this is right.

'constantRowsCount' = 1 means there are a constant number of rows, ie. Piwik websites.

This is not true.

I suggest the imageGraphEvolutionUrl metadata entry be left empty in http://git.piwik.org/piwik.git/blob/master/plugins/ImageGraph/ImageGraph.php#L46 by using a static list of excluded reports.

@JulienMoumne
Collaborator

This explains why you had to update an image in an integration testing file :2d5b0ac#diff-1

This image should not have changed since it is not an evolution graph.

@mattab
Owner

In 70b46ec: Fixes #3887
Proper fix for this problem, adding static array of "Row evolution not supported"

Also I decided to enable tests so they all run on my box /standard ubuntu, rather than travis CI.
Fixed a bug in tests that plugins language files were not loaded early enough.

@mattab
Owner

Of course you were right Julien +1

@mattab mattab was assigned by tsteur
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.