@esolix opened this Issue on December 22nd 2020

Matomo 4.1.0 (Upgraded from 4.0.5)

It was showing yesterday's analytics data rather than selected day (always showing data from a day before) on some part of the dashboard. Screenshot attached.

Screen Shot 2020-12-22 at 23 14 48

Downgraded back to 4.0.5 and it is fixed again.

Thanks

@mox575 commented on December 22nd 2020

I am seeing the same thing after the update. Right away I noticed on the Dashboard that the Visits for today were from yesterday's data. Visits over time is correct, but the visits overview is yesterdays total.

@sgiehl commented on December 23rd 2020 Member

I'm not able to reproduce that locally

@esolix @mox575 Could you maybe give some more information:

  • Does that only happen on the dashboard or is it happening on other report pages as well?
  • When opening the page the browser sends separate requests for each report, could you check the network tab of the browser console if the requests for the reports are containing the correct date parameter
  • Are you using the archiving cron to archive the reports or is that triggered by the browser?
@esolix commented on December 23rd 2020
  1. It is happening to dashboard only
  2. I have restored our instance (Let me clone it and retry to reproduce it from 4.05 to 4.1.0 upgrade in a moment.
  3. Using cron

Will update this in a moment

@esolix commented on December 23rd 2020

I'm not able to reproduce that locally

@esolix @mox575 Could you maybe give some more information:

  • Does that only happen on the dashboard or is it happening on other report pages as well?
  • When opening the page the browser sends separate requests for each report, could you check the network tab of the browser console if the requests for the reports are containing the correct date parameter
  • Are you using the archiving cron to archive the reports or is that triggered by the browser?

Attached is the output, i tried to match it with the production server with 4.0.5 - Output is the same.

Screen-Shot-2020-12-23-at-20 27 02

Let me know if you need me to run some more test i will leave the dev instance on.

@sgiehl commented on December 23rd 2020 Member

@esolix that's weird. Even the sparkline in the summary seems to have the correct values 🤔
Have you looked through all requests if the date is the same? Does that only happen when viewing todays stats or are any reports showing the wrong date in other cases as well?
btw. which timezone is your matomo site configured for?

@esolix commented on December 23rd 2020

@esolix that's weird. Even the sparkline in the summary seems to have the correct values 🤔
Have you looked through all requests if the date is the same? Does that only happen when viewing todays stats or are any reports showing the wrong date in other cases as well?
btw. which timezone is your matomo site configured for?

Yes I have, all the request seems to line up with the older version. It happens when viewing stats from any other day, so if I select 20th, it will show the 19th data. So it is wrong as well.

Timezone is setup for CST time (Central) and I am in Tokyo time.

@sgiehl commented on December 23rd 2020 Member

@esolix Ok. Thanks. That seems to be a timezone issue. I was able to reproduce that by setting up a site in CST timezone and generating some fake visits.
Will have a quick look if I'm able to figure out the reason.

@esolix commented on December 23rd 2020

@esolix Ok. Thanks. That seems to be a timezone issue. I was able to reproduce that by setting up a site in CST timezone and generating some fake visits.
Will have a quick look if I'm able to figure out the reason.

Thank you!

@sgiehl commented on December 23rd 2020 Member
@Pipwizard commented on December 23rd 2020

I just took the files from the 4.0.5 core/Period folder and overwrote the files in 4.1.0 core/Period folder and it now works.

So it's definitely a problem in core/Period

@mox575 commented on December 23rd 2020

Just FYI, I am in California, Pacific Standard Time

@esolix commented on December 23rd 2020

Seems to be a regression from this change:
https://github.com/matomo-org/matomo/pull/16830/files#diff-3f15e6e8235bb796794c812a3c85b929cb82ae02f1dfbcd6e74e105d1fb31a6bL170-R170

The fix works with

index.php?module=CoreHome&action=index&idSite=1&period=day&date=today#?idSite=1&period=day&date=2020-12-23&segment=&category=Dashboard_Dashboard&subcategory=1

but default still show yesterday's data

index.php?module=CoreHome&action=index&idSite=1&period=day&date=today#?idSite=1&period=day&date=today&segment=&category=Dashboard_Dashboard&subcategory=1

Thanks for the quick patch!

@BasketballBuzz commented on December 26th 2020

I'm also having this same issue. How do I fix this?

@Findus23 commented on December 26th 2020 Member

Hi @BasketballBuzz,

Have you tried applying the changes from #17008 (you can ignore the ones from tests/PHPUnit/Integration/Period/FactoryTest.php)?

@esolix commented on January 15th 2021

The fix does work for URL string that contains date, but "Today" query string (which is default dashboard URL) still show the same issue

Not working
index.php?module=CoreHome&action=index&idSite=1&period=day&date=today#?idSite=1&period=day&date=today&segment=&category=Dashboard_Dashboard&subcategory=1

Working by specifying today's date
index.php?module=CoreHome&action=index&idSite=1&period=day&date=today#?idSite=1&period=day&date=2021-01-15&segment=&category=Dashboard_Dashboard&subcategory=1

Thanks

This Issue was closed on December 24th 2020
Powered by GitHub Issue Mirror