Bug in 1.7.1 - Default report date Last 30 Days shows empty reports in new install


#1

I installed Piwik 1.7.1 release on Wednesday 3/21, today is Saturday 3/24, so I only have 4 days worth of data in the system. On the Settings page, I set “Report date to load by default” to “Last 30 days (including today)” and have setup archiving via cron at 5 minutes past the hour.

When I login to Piwik, All Websites shows 0 for everything, but the sparklines appear correct.

For all of my 6 websites, when I go to the dashboard, Visits Overview shows 0 for everything but shows correct sparklines with data. The Visitors in Real Time widget is correct (67 visits/75 pageviews in last 24 hours, 3 visits/3 pageviews in last 30 minutes), and Last visits graph widget shows the correct graph, but all other widgets show no data.

I believe this might be related to the “Last 30 days” default range in a new install. If I click on the date range picker, I can only select a date range starting on 3/21 when Piwik was installed, but because of this default setting, it’s using a date range of 2/24 to 3/24 (when Piwik was only installed on 3/21). My guess at this is that when using the the default date range of last 30 days, there isn’t a check that data is present for all of that time, and if not, the reports are all erroring out/returning zeros because there’s no start data for the first date selected.

I can confirm this by manually specifying a date range of 3/21 (first selectable date) through 3/24 (today), or by selecting “Month”. In both of these cases, all reports and widgets give the correct data.

I haven’t gotten into the code yet, but I can take a look around. My suggestion would be:

  1. Wherever the error causing 0 data on the back-end is, it should be logging an error instead of dieing silently.
  2. When the default date range, as specified in Settings, is selected, there should be a check that the start date of that range is valid and contains data. If not, the start date of the default range should be changed to the first valid date.

(Matthieu Aubry) #2

Cany ou see any error in your server error logs?


#3

No, nothing visible in the apache error logs.