Skip to content


Archiving fails when an invalid column is requested (VisitsSummary) #2748

BeezyT opened this Issue · 2 comments

2 participants


The reason for this bug seems to be quite complex, I hope someone else (i.e. matt ;-) ) can make sense of it...

Reproduce (don't do it on the demo since it breaks the archives):

  1. Get the VisitsSummary for a range: ...?module=API&method=VisitsSummary.get&idSite=1&period=range&date=2010-07-17,2010-07-18

  2. Now specify an invalid column: ...?module=API&method=VisitsSummary.get&idSite=1&period=range&date=2010-07-17,2010-07-18&columns=xxx

  3. Reload the VisitsSummary with all columns (like step 1) - all values are 0 now.

Observation: The second call somehow retriggers archiving, there are more records in the numberic archive table afterwards.

Possible point to start: Piwik_Archive_Single::get is asked for the invalid column.


This was also reported in #2745

1. Making a request to any widget without specifying @columns parameter. e.g.: index.php?module=API&format=html&method=VisitsSummary.get&idSite=2&period=range&date=2011-10-01,2011-10-01 [see first screen shot]
It returns Visits = '4' and it's Ok.

2. Making request with incorrect @columns parameter. e.g.: index.php?module=API&format=html&method=VisitsSummary.get&idSite=2&period=range&date=2011-10-01,2011-10-01&columns=nb_act [see second screen shot]
It returns '0' and it's Ok as such a metric doesn't exist.

3. Making request without @columns parameter again (The same as in first step). e.g.: index.php?module=API&format=html&method=VisitsSummary.get&idSite=2&period=range&date=2011-10-01,2011-10-01 [see third screen shot]
It returns Visits = '0' and it's not Ok. 

(In [5562]) Fixes #2748 Now throwing exception when requested column does not seem valid
It seems to fix the issue

Refs #2745

@BeezyT BeezyT added this to the 1.7 Piwik 1.7 milestone
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.