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

4.1.0 Data from "Channel Types" and others are showing Yesterday's data while some other part are showing today's data #16999

Closed
esolix opened this issue Dec 22, 2020 · 15 comments · Fixed by #17008
Assignees
Labels
Regression Indicates a feature used to work in a certain way but it no longer does even though it should.
Milestone

Comments

@esolix
Copy link

esolix commented Dec 22, 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

@Findus23 Findus23 changed the title 4.10 Data from "Channel Types" and others are showing Yesterday's data while some other part are showing today's data 4.1.0 Data from "Channel Types" and others are showing Yesterday's data while some other part are showing today's data Dec 22, 2020
@mox575
Copy link

mox575 commented Dec 22, 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.

@tsteur tsteur added the Regression Indicates a feature used to work in a certain way but it no longer does even though it should. label Dec 22, 2020
@tsteur tsteur added this to the 4.2.0 milestone Dec 22, 2020
@sgiehl
Copy link
Member

sgiehl commented Dec 23, 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?

@esolix
Copy link
Author

esolix commented Dec 23, 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
Copy link
Author

esolix commented Dec 23, 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
Copy link
Member

sgiehl commented Dec 23, 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?

@esolix
Copy link
Author

esolix commented Dec 23, 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
Copy link
Member

sgiehl commented Dec 23, 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.

@esolix
Copy link
Author

esolix commented Dec 23, 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
Copy link
Member

sgiehl commented Dec 23, 2020

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

@sgiehl sgiehl self-assigned this Dec 23, 2020
@Pipwizard
Copy link

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
Copy link

mox575 commented Dec 23, 2020

Just FYI, I am in California, Pacific Standard Time

@esolix
Copy link
Author

esolix commented Dec 23, 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
Copy link

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

@Findus23
Copy link
Member

Hi @BasketballBuzz,

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

@esolix
Copy link
Author

esolix commented Jan 15, 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Regression Indicates a feature used to work in a certain way but it no longer does even though it should.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants