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

Error: Class 'Piwik_UserCountry_LocationProvider' not found #3452

Closed
anonymous-matomo-user opened this issue Oct 17, 2012 · 9 comments
Closed
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc. Critical Indicates the severity of an issue is very critical and the issue has a very high priority.
Milestone

Comments

@anonymous-matomo-user
Copy link

A upgrade from 1.8.4 with the old GeoIP plugin enabled to the latest 1.9 throws this error when attempting to track.

PHP Fatal error: Class 'Piwik_UserCountry_LocationProvider' not found in /path/to/core/Tracker/Visit.php on line 609

I am assuming it's a geoip issue.

The upgrade was done by replacing the entire installation folder with the 1.9 files and copying the config/config.ini.php from the old install.

I removed the old GeoIP plugin from the config.ini.php. Then ran the sql update script. The new Geolocation configuration is set to use (GeoIP (PECL). The error occurs with any Geo location setting. The GeoIPCity.dat file is in the Misc/ folder.

The system does track for about 30 seconds if I delete the tmp folder. Piwik regenerates the tmp folder and then it starts throwing the above error again.

Any ideas?

@anonymous-matomo-user
Copy link
Author

I have the same problem. The plugin UserCountry is enabled and i have temporarly resolve the problem by adding the followed two lines in the script core/Tracker/Visit.php :

require_once PIWIK_INCLUDE_PATH . "/plugins/UserCountry/LocationProvider.php";
require_once PIWIK_INCLUDE_PATH . "/plugins/UserCountry/UserCountry.php";

I don't thing that this is the correct way to resolve the problem.

@anonymous-matomo-user
Copy link
Author

Phoenix,

That seems to have solved the issue here as well.

Thank you

@anonymous-matomo-user
Copy link
Author

Phoenix, or anybody else interested. The issue seems to solve it's self if you are careful with the order in which the Tracker plugins are listed.

I changed mine to look like below as the last lines in the config/config.ini.php file.

[Plugins_Tracker]
Plugins_Tracker[] = "AnonymizeIP"
Plugins_Tracker[] = "DoNotTrack"
Plugins_Tracker[] = "Provider"
Plugins_Tracker[] = "UserCountry"
Plugins_Tracker[] = "GeoIP"
Plugins_Tracker[] = "Goals"

I am not sure if the above order is correct, but it appears to solve the issue for me.
Once done, I was able to take the two lines out of the Visit.php file and GeoIP is now recording information correctly.

As a side note, I imagine anybody who is doing manual configuration or multiple severs may run into this.

Thank you

@diosmosis
Copy link
Member

(In [7237]) Fixes #3452, add UserCountry to Plugins_Tracker config and in order to avoid possible fatal error, moved UNKNOWN_CODE to Tracker_Visit and use 'country_code' instead of LocationProvider constant.

@anonymous-matomo-user
Copy link
Author

This bug seems not finally fixed. I have thousands of this in error log per day and server 500 errors. I'm using latest 1.12

PHP Fatal error: Class 'Piwik_UserCountry_LocationProvider' not found in /srv/aaa/bbb/html/piwik/core/Tracker/Visit.php on line 655,

@mattab
Copy link
Member

mattab commented Oct 14, 2013

please try with latest 2.0-a and reopen if you still have the issue in 2.0 http://builds.piwik.org/?C=N;O=D

@anonymous-matomo-user
Copy link
Author

I'm sorry, but I only use official releases and not alpha versions. Make a new release or point me to the bugfix case, please.

The issue reported here is not fixed in 1.12

@anonymous-matomo-user
Copy link
Author

There is no answer.

I'm running 1.12 and the system is down. Upgrading to alpha versions is a joke. Are you crazy?

Let us know how this can ve fixed and when you release a 1.13 or 2.0 final with bugfix included. Also share a hotfix patch for 1.12, please.

@diosmosis
Copy link
Member

@hass

Try adding "UserCountry" to [Plugins_Tracker] in your config/config.ini.php file (as mentioned above). If that doesn't work, try adding


require_once PIWIK_INCLUDE_PATH . "/plugins/UserCountry/LocationProvider.php";
require_once PIWIK_INCLUDE_PATH . "/plugins/UserCountry/UserCountry.php";

to core/Tracker/Visit.php after the '<?php' line (also as mentioned above).

If neither of these solutions work, please use the forums for support: http://forum.piwik.org/. These tickets reference problems that exist in the current code on github (either on master or the 1.X branch). It is not appropriate to use trac as your personal helpdesk. Please do not reopen this ticket again.

@anonymous-matomo-user anonymous-matomo-user added this to the 1.9.1 - Piwik 1.9.1 milestone Jul 8, 2014
This issue was closed.
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. Critical Indicates the severity of an issue is very critical and the issue has a very high priority.
Projects
None yet
Development

No branches or pull requests

3 participants