-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Notice: Undefined index: 2011-08-18 in plugins/API/API.php on line 493 #5168
Comments
Tried to reproduce but couldn't. Tried with different dates, different formats, different idSites,... I could add a simple check whether the key exists and continue if not (as it does not make sense to merge tables when there is no second table). But then we don't know why there is no matching key in the second table at all which could be actually a bug. Will unassign me again.
|
Bug was reproduced on demo, so hopefully we can find out the original cause, on this piwik instance! Increasing priority (because it fails the crontab script) |
Maybe this bug only occurs at the end of the month? Somehow it didn't happen again. It happened only once on the demo on May 31st. |
happened again today on demo, here is the log:
|
It happened again for me today with 2.4.1 edit: log:
|
Ok, got it again, this time in the segment processing. But I noticed something. Yesterday, when it broke during the normal reports archiving, it crossed a date change:
then when I started it again yesterday, the normal reports archiving executed, but the segments didn't:
again, crossing the date. Funny thing: the notice in the segment processing did not stop the archiving process. The during the normal reports archiving did. I'd venture a guess that there's some "now() - 365" being used somewhere that changes with a date change and leads to unexpected results. My php fu isn't good enough though to debug this situation properly :/ |
The bug occurs when the archive processing starts on a given day, and the process takes long time, and overlaps on to the next day. Then in the code date() functions are called on this new day. But the datatable processed didn't contain this day yet (since it started yesterday). the datatable key for "today" is undefined. I think in this case it's fine to simply put a check as @tsteur suggested. |
This was a bug reported in the Piwik forums.
from API request: index.php?module=API&method=API.get&idSite=1&period=day&date=last1000&format=php&token_auth=<token>&trigger=archivephp. Response was '
Notice: Undefined index: 2011-08-18 in /var/www/vhosts/piwik.harrison.neadwerx.com/piwik/plugins/API/API.php on line 493
The text was updated successfully, but these errors were encountered: