Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Ensure Database is set in Tracker #4603

Closed
anonymous-piwik-user opened this Issue · 3 comments

2 participants

@anonymous-piwik-user

When using 2.0.3 and an token_auth for bulk tracking, as well as have PIWIK_TRACKER_MODE set to true.

On every valid bulk request submission I had the following error,

PHP Fatal error: Call to a member function fetchAll() on a non-object in ... /piwik/core/Db.php on line 164

I found that fetchAll() retrieved it's db object from get(), which was calling Tracker::getDatabase(), which was returning null.

I've submitted a fix/pull request here:

#215

Upon adding my check, everything worked.

Please note that if I set PIWIK_TRACKER_MODE to false, then Piwik stops accepting my token_auth key.

I want my fix to be applied upstream, and it was suggested that a bug report needed to be submitted first.
Keywords: buk tracking

@mattab
Owner

Thanks for the report. So bulk request as explained here:

http://developer.piwik.org/api-reference/tracking-api#bulk-tracking

does not work for you in 2.0.3?

@mattab
Owner

In 74c865d: Adding integration test for the Bulk Tracking API, it FAILS at present! refs #4603
Thanks for the report, we didn't catch this failure as it wasn't properly continuously tested!

@mattab
Owner

In a6e4884: Fixes #4603 Adding lazy DB connection call

@anonymous-piwik-user anonymous-piwik-user added this to the 2.1 - Piwik 2.1 milestone
@sabl0r sabl0r referenced this issue from a commit in sabl0r/piwik
@mattab mattab Adding integration test for the Bulk Tracking API, it FAILS at presen…
…t! refs #4603

Thanks for the report, we didn't catch this failure as it wasn't properly continuously tested!
74c865d
@sabl0r sabl0r referenced this issue from a commit in sabl0r/piwik
@mattab mattab Fixes #4603 Adding lazy DB connection call a6e4884
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.