Piwik 1.9 does not count cause of Fatal error

I upgraded today to piwik 1.9. I wonder why no new visits occure in the database and found many errors in the apache log:

PHP Fatal error: Class ‘Piwik_UserCountry_LocationProvider’ not found in /var/www/html-ssl/piwik/core
/Tracker/Visit.php on line 609, referer: …(a page of my website)

So what I did is to comment all lines out, which use this class in Visit.php. Now it works again, but I loose any information about where the visitor comes from.

What can I do? (I do not want to use GeoIP-extensions; the old way was okay for me as I anonymize the ips).


I have exactly the same problem. I resolve it by adding at the beggining of the file core/Tracker/Visit.php :

require_once PIWIK_INCLUDE_PATH . “/plugins/UserCountry/LocationProvider.php”;
require_once PIWIK_INCLUDE_PATH . “/plugins/UserCountry/UserCountry.php”;

But i don’t think that it is the correct way to really solve the problem.

The bug is tracked in: Error: Class 'Piwik_UserCountry_LocationProvider' not found · Issue #3452 · matomo-org/matomo · GitHub

The solution you provided is correct. We will release a new version to fix this bug, in a few days.

This is still not fixed when importing logfiles although the trac entry 3452 is closed as fixed.

[Sun Oct 28 11:01:40 2012] [error] [client XXXXXXXXX] PHP Fatal error: Class ‘Piwik_UserCountry_LocationProvider’ not found in /var/www/apps/piwik/core/Tracker/Visit.php on line 628

This should be fixed in 1.9.1 can you reupload all files and try again?

Is it possible that the auto updater does not replace all the files correctly? I did an update from 1.9 to 1.9.1 and now - after your hint - I downloaded latest 1.9.1 zip and did a diff of all the files and some of them differ. The update completed without errors and dashboard shows version info as 1.9.1

What is the state of the plugin “UserCountry”? For me, Piwik 1.9.2-b3 is only tracking when it is activated.

Ok, the plugin is NOT active, so this seems to be the cause of the problem. Should be fixed I think :wink: