Class 'Piwik' not found in /home/first-world.info/stat/core/PluginsManager.php on line 438

Hello, with the last piwik I have:
Class ‘Piwik’ not found in /home/first-world.info/stat/core/PluginsManager.php on line 438
And again don’t track the visitor.
Cheer,

Try reupload all files, looks like some files missing ?

No it’s problem of include, I have fixed by:
/home/first-world.info/stat/core/PluginsManager.php include core/Piwik.php
/home/first-world.info/stat/core/Piwik.php include libs/Zend/Registry.php
/home/first-world.info/stat/libs/Zend/Registry.php include libs/Zend/Exception.php

Same problem occurred here and was solved with dragonx86’s fix.

(Using Apache, PHP, MySQL as delivered with Debian 6.0.7)

Piwik can have auto-test to prevent broke every release?

I don’t know what this error is and why it needs to be fixed, it works for us in al cases. I think there’s a misconfiguration somewhere?

I presume about different order of module/classe loading, I use piwik since lot of time (more than 3 year).
But I presume you can do a checker by extracting the class use by llvm/doxygen, and check if the include is right.

@dragonx86, we are already using automatic tests to determine build failures: Travis CI - Test and Deploy Your Code with Confidence

Since the latest version is working for most people I am not sure what yields the error in your ase.

Yes, but the automatic tests don’t check my case (my case is same than other user). And you will have posibility of not controled error into your automatic tests, that’s will product generale problem. Then improve it is better. I can provide you the needed information.

So what is your case? Can you show a way to reproduce the error?

Test case:
Request URL:http://stat.domain.com/piwik.php?action_name=Ultracopier%20(Teracopy%2C%20SuperCopier%20like)%2C%20replacement%20for%20files%20copy%20dialogs&idsite=1&rec=1&r=540964&h=15&m=27&s=5&url=http%3A%2F%2Fultracopier.first-world.info%2F&_id=042c9bf276b453cd&_idts=1299162592&_idvc=1024&_idn=0&_refts=1363184825&_viewts=1363166166&_ref=http%3A%2F%2Fwww.gratilog.net%2Fxoops%2Fmodules%2Fnewbb%2Fviewtopic.php%3Fpost_id%3D144824%26topic_id%3D8647%26forum%3D7&pdf=0&qt=0&realp=0&wma=0&dir=0&fla=1&java=1&gears=0&ag=0&cookie=1&res=1920x1080
Request Method:GET
action_name:Ultracopier (Teracopy, SuperCopier like), replacement for files copy dialogs
idsite:1
rec:1
r:540964
h:15
m:27
s:5
url:http://ultracopier.first-world.info/
_id:042c9bf276b453cd
_idts:1299162592
_idvc:1024
_idn:0
_refts:1363184825
_viewts:1363166166
_ref:http://www.gratilog.net/xoops/modules/newbb/viewtopic.php?post_id=144824&topic_id=8647&forum=7
pdf:0
qt:0
realp:0
wma:0
dir:0
fla:1
java:1
gears:0
ag:0
cookie:1
res:1920x1080
On the tracker then.
My config file:
http://files.first-world.info/temp/config.ini.txt
http://files.first-world.info/temp/global.ini.txt
With multiple website (each have unique config, one is ecommerce, one exclude parametters, …)
Cheer,

what PHP versions are you using ? upgrade latest PHP please

Hello, I’m using the last php 5.4.
I have do a fix to show the broke in piwik.
I don’t wish workaround with my hosting but real fix and control into piwik.

Can you just paste the setup to reproduce the error?

Line 438 is the call to Piwik::log here:

if(!file_exists($path))
{
Piwik::log(sprintf(“Unable to load plugin ‘%s’ because ‘%s’ couldn’t be found.”, $pluginName, $path));
return null;
}

In my case this was caused by the following entry in config/config.ini.php, in the Plugins_Tracker section:
Plugins_Tracker = “GeoIP”

Apparently the plugin has been removed and the call to log this failed. The workaround was to remove/comment this line in the config.

It looks like the autoloader for the PIwik class is not setup properly or something similar.
I had just pulled the current master, where the issue still remained.

I don’t found how reproduct the bug. But tell me what do you need file/test to find the bug and add to automated test.

@bluyed: Interesting thanks! I fixed this issue temporarily in master. Piwik class is not loaded when in tracking mode, so Piwik::log is not available.

@dragonx86: Thanks - we will see how we can add an automated test for this.

See bug report in Remove Notice in tracker when a plugin is not found · Issue #3824 · matomo-org/matomo · GitHub