Closed JanST123 closed 7 years ago
Did you change anything on that day? Maybe added a plugin or changed the tracking code to track additional stuff? Can you see visits tracked in the real time log?
No I didn't changed anything on that day. Neither on server side nor on tracking side.
I can still see all the visits in the realtime log.
Can you check that the Events plugin is activated for you?
Hi @mattab, yes - the Plugin is enabled.
@JanST123 have you experienced this issue again, or was it just a one-off?
Hi @mattab , yes this issue still occurs. I'm just workarounding it by adding a "return;" statement before the Exception is thrown in plugins/Actions/ArchivingHelper.php. I guess due to this workaround I will miss some data, but the Archiving is working again (until the next Piwik update). I'm currently on Piwik 3.0.4
366 if (is_null($currentTable)) {
367 return;
368 throw new \Exception("Action table for type '$actionType' was not found during Actions archiving.");
369 }
I can provide you with a database dump, if it can help you debugging this issue.
Ok thanks for confirming. We will investigate in the next few weeks, and may ask for a DB dump if needed then. cc @sgiehl would be great to understand and tackle that issue sometime soon (we can move to next release if we don't make it in this one)
@JanST123 I'll try to tackle that issue. Could you please send a database dump to stefan@piwik.org. That might make it easier to reproduce the issue. Thx.
@sgiehl You've got mail :)
@JanST123 thx. will have a look
Ok. I was able to identify the problem and why the archiving fails.
The archiving query generated in Actions Archiver returns some entries with action type 12
, which is event name. Those entries should imho be excluded by log_link_visit_action.idaction_event_category IS NULL
, but seems there are some entries without event category.
Fixing the query should be easy, but additionally we should investigate how those entries were created in the first place, as they might somehow be not correct.
That may happen because of my event tracking implementation where the category is always the search term the user recently entered. It should not happen that events are tracked without search term/when no search is active - but I could imagine that it can happen somehow.
Maybe event_category could be set to an empty string when not passed and event_name is given?
Thought of something similar. But actually it's not empty string, as _paq.push(['trackEvent', '', 'action', 'name']);
won't trigger any tracking. It seems to happen for category strings filled with one or more whitespaces, as they are truncated here.
@tsteur should we do the trim() in js tracker already and discard trackings with an empty/whitespace category?
It needs to be fixed in core to have it fixed for all trackers. However, we should trim the category in the tracker and throw an error there as well and not even send the request to Piwik.
Wouldn't we need to return return ''
instead of return false
there? Alternatively, we could throw an InvalidRequestParameterException
as it looks like a category is mandatory. Or we could remove the trim but that might be confusing when no value is disabled in the reporting (we could however apply the trim with a filter in the API and display message like "No text provided").
The doc says "e_c" must not be empty in https://developer.piwik.org/api-reference/tracking-api which actually applies to a category with whitespace. I would personally remove the trim as I don't think there should be such logic but also happy with any solution. Removing the trim might screw the data for people who have been tracking with leading / trailing whitespace so maybe throwing an InvalidRequestParameterException
and mentioning the trim in the docs could be better.
https://github.com/piwik/piwik/blob/3.x-dev/plugins/Events/Actions/ActionEvent.php#L38 would probably stay as it is.
@tsteur proposed some changes to fix that. Maybe you could have a short look.
Hi, I started using Piwik a week ago, tracking 2 websites. The archiving cron runs every hour.
Now I recognized that the archiving stopped working for one of the two websites 4 days ago. It worked for both websites before (see the screenshot: https://drive.google.com/file/d/0B7Ss7W8DbUYtNm9rOFkzbUxFMTQ/view?usp=sharing)
Here is the full output from the archiving job:
Edit: This is the system summary. System-check is all green. I did not install any additional plugins. If you need additional information please ask. :)