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

Transitions Report - Exception NoDataForAction – Timezone issue? #18202

Open
heurteph-ei opened this issue Oct 22, 2021 · 1 comment
Open
Labels
Bug For errors / faults / flaws / inconsistencies etc.

Comments

@heurteph-ei
Copy link

heurteph-ei commented Oct 22, 2021

Expected Behavior

Today should respect Timezone in the transitions report

Current Behavior

When looking at Transitions reporting, I am getting Exception NoDataForAction. I am running this report for today as the time period.

Earlier (today), however, transitions was reporting data.

If I select the report for a wider date-range (but still inclusive of today), I get the data/report again.

My timezone is set as US New York for the site (and also in general settings).

It is currently still the Oct. 21 here, but UTC has flipped to Oct. 22. See logging below.

My thought is that the query “today” is not respecting Timezone and trying to pull data for Oct. 22 - a day that has not happened yet (where I live :slight_smile: ) Any thoughts on this as the problem? Any fix or config I can try? Thanks!

Debug log is showing (a few representative entries):
ERROR API[2021-10-22 00:52:46 UTC] [0e58b] Uncaught exception in API: /var/www/…/plugins/Transitions/API.php(195): NoDataForAction
Uncaught exception in API: /…/plugins/Transitions/API.php?date=today&actionType=url&actionName=https%3A%2F%2Fmysite.com%2F&expanded=1&format=JSON&module=API&method=Transitions.getTransitionsForAction&filter_limit=-1&idSite=2&period=day, CLI mode: 0]

Possible Solution

No idea

Context

From: https://forum.matomo.org/t/transitions-report-exception-nodataforaction-timezone-issue/43533

Your Environment

  • Matomo Version: 4.5.0
  • PHP Version: 7.3
  • Server Operating System: Debian 10
  • Additionally installed plugins:
@heurteph-ei heurteph-ei added the Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. label Oct 22, 2021
@sgiehl
Copy link
Member

sgiehl commented Nov 13, 2022

This might indeed be a problem around midnight maybe. Haven't tested that through but I think the API uses UTC timezone to create the period. Maybe that needs to be done in the site's timezone here:

// prepare log aggregator
$site = new Site($idSite);
$period = Period\Factory::build($period, $date);
$segment = new Segment($segment, $idSite, $period->getDateStart(), $period->getDateEnd());
$params = new ArchiveProcessor\Parameters($site, $period, $segment);
$logAggregator = new LogAggregator($params);

@sgiehl sgiehl added Bug For errors / faults / flaws / inconsistencies etc. and removed Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. labels Nov 13, 2022
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

3 participants