@anonymous-piwik-user opened this Issue on July 6th 2011

See reportings in http://forum.piwik.org/read.php?2,78979

When clicking on UI Framework Tab Fatal error: Class 'Piwik_DataTable' not found in /home/piwik/public_html/plugins/ExampleUI/API.php on line 77

The class 'Piwik_DataTable' that method 'getTemperatures' is trying to use doesnt appear to be loaded.

By adding class 'Piwik_DataTable' to '/plugins/ExampleUI/API.php' allows the method 'getTemperatures' to use the class and then the Framework UI page works.

Adding the following code before trying to use the class fixes the issue as a temporary solution:

if (!class_exists('Piwik_DataTable', false))
{
include(PIWIK_INCLUDE_PATH .'/core/DataTable.php');
}

Patch attached

I think some sort of check for dependent classes should be introduced and should fail during automated tests.

PHP 5.3
Piwik 1.5.1

Keywords: class method doesnt exist

@anonymous-piwik-user commented on July 6th 2011

Attachment:
API.php.patch

This Issue was closed on July 7th 2011
Powered by GitHub Issue Mirror