Recoverable Error: Argument 1 passed to Piwik_DataTable::addRow() must be an instance of Piwik_DataTable_Row, instance of __PHP_Incomplete_Class given

I have upgrade Piwik to Git master, but then reverted to the 1.12 tag.

I am getting the following error when trying to view the charts of a year.

URL: index.php?module=MultiSites&action=index&idSite=1&period=year&date=2013-09-13

Recoverable Error: Argument 1 passed to Piwik_DataTable::addRow() must be an instance of Piwik_DataTable_Row, instance of __PHP_Incomplete_Class given, called in /var/piwik.git/core/DataTable.php on line 1085 and defined in /var/piwik.git/core/DataTable.php on line 575

Backtrace →

#0 Piwik_ErrorHandler(…) called at [/var/piwik.git/core/DataTable.php:575]
#1 Piwik_DataTable->addRow(…) called at [/var/piwik.git/core/DataTable.php:1085]
#2 Piwik_DataTable->addRowsFromArray(…) called at [/var/piwik.git/core/DataTable.php:1054]
#3 Piwik_DataTable->addRowsFromSerializedArray(…) called at [/var/piwik.git/core/Archive/Single.php:504]
#4 Piwik_Archive_Single->getDataTable(…) called at [/var/piwik.git/core/Archive/Single.php:348]
#5 Piwik_Archive_Single->loadSubDataTables(…) called at [/var/piwik.git/core/ArchiveProcessing/Period.php:211]
#6 Piwik_ArchiveProcessing_Period->getRecordDataTableSum(…) called at [/var/piwik.git/core/ArchiveProcessing/Period.php:176]
#7 Piwik_ArchiveProcessing_Period->archiveDataTable(…) called at [/var/piwik.git/plugins/Actions/Archiving.php:70]
#8 Piwik_Actions_Archiving->archivePeriod(…) called at [/var/piwik.git/plugins/Actions/Actions.php:577]
#9 Piwik_Actions->archivePeriod(…) called at [:]
#10 call_user_func_array(…) called at [/var/piwik.git/libs/Event/Dispatcher.php:284]
#11 Event_Dispatcher->postNotification(…) called at [/var/piwik.git/core/PluginsManager.php:674]
#12 Piwik_PostEvent(…) called at [/var/piwik.git/core/ArchiveProcessing/Period.php:264]
#13 Piwik_ArchiveProcessing_Period->compute(…) called at [/var/piwik.git/core/ArchiveProcessing.php:485]
#14 Piwik_ArchiveProcessing->launchArchiving(…) called at [/var/piwik.git/core/Archive/Single.php:223]
#15 Piwik_Archive_Single->prepareArchive(…) called at [/var/piwik.git/core/Archive/Array/IndexedBySite.php:177]
#16 Piwik_Archive_Array_IndexedBySite->getArchiveIdsAfterLaunching(…) called at [/var/piwik.git/core/Archive/Array/IndexedBySite.php:122]
#17 Piwik_Archive_Array_IndexedBySite->loadValuesFromDB(…) called at [/var/piwik.git/core/Archive/Array/IndexedBySite.php:102]
#18 Piwik_Archive_Array_IndexedBySite->getValues(…) called at [/var/piwik.git/core/Archive/Array/IndexedBySite.php:70]
#19 Piwik_Archive_Array_IndexedBySite->getDataTableFromNumeric(…) called at [/var/piwik.git/plugins/MultiSites/API.php:213]
#20 Piwik_MultiSites_API->buildDataTable(…) called at [/var/piwik.git/plugins/MultiSites/API.php:112]
#21 Piwik_MultiSites_API->getAll(…) called at [/var/piwik.git/plugins/MultiSites/Controller.php:63]
#22 Piwik_MultiSites_Controller->getSitesInfo(…) called at [/var/piwik.git/plugins/MultiSites/Controller.php:35]
#23 Piwik_MultiSites_Controller->index(…) called at [:]
#24 call_user_func_array(…) called at [/var/piwik.git/core/FrontController.php:125]
#25 Piwik_FrontController->dispatch(…) called at [/var/piwik.git/index.php:47]

Can you delete the piwik_archive_2013_09 table which hopefully will fix this issue?

Yes, removing the piwik_archive_* tables fixed it.

But in general, this should be something that Piwik should handle itself, e.g. by discarding the invalid data.

btw: I reverted to v1.12, because the graphs in the dashboard displayed only a “0-line” for all sites, and most widgets for the current year also displayed no data (using current master, just retested). No errors in the log though.

Git master is the development version of 2.0. Piwik usually doens’t produce invalid data and therefore we don’t provide an automatic way to discard it. 2.0 is a new major release and contains some backwards incompatible changes.

we do not support Backporting from 2.0 to 1.X …