Opened 13 months ago

Closed 11 months ago

Last modified 11 months ago

#3887 closed Bug (fixed)

Evolution ImageGraph is not working for Referers.getAll

Reported by: tsteur Owned by: mattab
Priority: normal Milestone: 2.x - The Great Piwik 2.x Backlog
Component: Core Keywords:
Cc: Sensitive: no

Description

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

Change History (7)

comment:1 Changed 12 months ago by matt (mattab)

  • Milestone set to 1.12 - The Great 1.x Backlog

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

comment:2 Changed 12 months ago by matt (mattab)

  • Milestone changed from 1.12 - The Great 1.x Backlog to 2.x - Piwik 2.x

Clearing 1.x ticket list, moving to 2.x

comment:3 Changed 11 months ago by matt (mattab)

  • Owner set to mattab
  • Resolution set to fixed
  • Status changed from new to closed

In 2d5b0aca2c0bbbe0f740182134c0162b11466fd2:

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

comment:4 Changed 11 months ago by JulienM (JulienMoumne)

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.

comment:5 Changed 11 months ago by JulienM (JulienMoumne)

This explains why you had to update an image in an integration testing file : https://github.com/piwik/piwik/commit/2d5b0aca2c0bbbe0f740182134c0162b11466fd2#diff-1

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

comment:6 Changed 11 months ago by matt (mattab)

In 70b46eceba318a55d17d4aee0cb03eddb90e5d2c:

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.

comment:7 Changed 11 months ago by matt (mattab)

Of course you were right Julien +1

Note: See TracTickets for help on using tickets.