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

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

Closed
timo-bes opened this issue Oct 30, 2011 · 2 comments
Closed

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

timo-bes opened this issue Oct 30, 2011 · 2 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@timo-bes
Copy link
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
Copy link
Member

mattab commented Oct 30, 2011

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. 

@mattab
Copy link
Member

mattab commented Dec 18, 2011

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

Refs #2745

@timo-bes timo-bes added this to the 1.7 Piwik 1.7 milestone Jul 8, 2014
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.
Projects
None yet
Development

No branches or pull requests

2 participants