@BeezyT opened this Issue on October 30th 2011 Member

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.

@mattab commented on October 30th 2011 Member

This was also reported in #2745

1. Making a request to any widget without specifying <a class='mention' href='https://github.com/columns'>@columns</a> 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 <a class='mention' href='https://github.com/columns'>@columns</a> 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 <a class='mention' href='https://github.com/columns'>@columns</a> 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. 
@mattab commented on December 18th 2011 Member

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

Refs #2745

This Issue was closed on February 13th 2012
Powered by GitHub Issue Mirror