Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#2748 closed Bug (fixed)

Archiving fails when an invalid column is requested (VisitsSummary)

Reported by: EZdesign Owned by:
Priority: normal Milestone: 1.7 Piwik 1.7
Component: Core Keywords:
Cc: Sensitive: no

Description

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
  1. Now specify an invalid column: ...?module=API&method=VisitsSummary.get&idSite=1&period=range&date=2010-07-17,2010-07-18&columns=xxx
  1. 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.

Change History (4)

comment:1 Changed 2 years ago by matt (mattab)

  • Milestone set to 1.6.x Piwik 1.6.x

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. 

comment:2 Changed 2 years ago by matt (mattab)

  • Priority changed from major to critical

comment:3 Changed 2 years ago by matt (mattab)

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

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

Refs #2745

comment:4 Changed 2 years ago by matt (mattab)

  • Priority changed from critical to normal
  • Summary changed from Archiving bug with invalid columns in VisitsSummary to Archiving fails when an invalid column is requested (VisitsSummary)
Note: See TracTickets for help on using tickets.