Piwik 1.8.2 Error


#1

Hi,

when I click in Ecommerce & Goals on any item in the Conversions overview by type of visit, i get the following error in the popup:

Warning: Illegal offset type in isset or empty in /homepages/XXXXXXXX/htdocs/piwik/core/DataTable.php on line 516

Backtrace -->
#0 Piwik_ErrorHandler(…) called at [/homepages/XXXXXXXX/htdocs/piwik/core/DataTable.php:516]#1 Piwik_DataTable->getFilteredTableFromLabel(…) called at [/homepages/XXXXXXXX/htdocs/piwik/core/DataTable/Array.php:252]#2 Piwik_DataTable_Array->getFilteredTableFromLabel(…) called at [/homepages/XXXXXXXX/htdocs/piwik/core/API/DataTableManipulator/LabelFilter.php:72]#3 Piwik_API_DataTableManipulator_LabelFilter->filter(…) called at [/homepages/XXXXXXXX/htdocs/piwik/core/API/ResponseBuilder.php:323]#4 Piwik_API_ResponseBuilder->handleDataTable(…) called at [/homepages/XXXXXXXX/htdocs/piwik/core/API/ResponseBuilder.php:79]#5 Piwik_API_ResponseBuilder->getResponse(…) called at [/homepages/XXXXXXXX/htdocs/piwik/core/API/Request.php:130]#6 Piwik_API_Request->process(…) called at [/homepages/XXXXXXXX/htdocs/piwik/plugins/API/API.php:1195]#7 Piwik_API_API->loadRowEvolutionDataFromAPI(…) called at [/homepages/XXXXXXXX/htdocs/piwik/plugins/API/API.php:1092]#8 Piwik_API_API->getSingleRowEvolution(…) called at [/homepages/XXXXXXXX/htdocs/piwik/plugins/API/API.php:1078]#9 Piwik_API_API->getRowEvolution(…) called at [:]#10 call_user_func_array(…) called at [/homepages/XXXXXXXX/htdocs/piwik/core/API/Proxy.php:190]#11 Piwik_API_Proxy->call(…) called at [/homepages/XXXXXXXX/htdocs/piwik/core/API/Request.php:128]#12 Piwik_API_Request->process(…) called at [/homepages/XXXXXXXX/htdocs/piwik/plugins/CoreHome/DataTableRowAction/RowEvolution.php:162]#13 Piwik_CoreHome_DataTableRowAction_RowEvolution->loadEvolutionReport(…) called at [/homepages/XXXXXXXX/htdocs/piwik/plugins/CoreHome/DataTableRowAction/RowEvolution.php:99]#14 Piwik_CoreHome_DataTableRowAction_RowEvolution->__construct(…) called at [/homepages/XXXXXXXX/htdocs/piwik/plugins/CoreHome/Controller.php:138]#15 Piwik_CoreHome_Controller->getRowEvolutionPopover(…) called at [:]#16 call_user_func_array(…) called at [/homepages/XXXXXXXX/htdocs/piwik/core/FrontController.php:138]#17 Piwik_FrontController->dispatch(…) called at [/homepages/XXXXXXXX/htdocs/piwik/index.php:53]


(Matthieu Aubry) #2

thanks for the report - are you using Piwik 1.8.2 ?


#3

Yes, I’m using 1.8.2


#4

Hi,
I’ve made a new installation of Piwik 1.8.2, and now I have the following error:

Notice: Undefined offset: 0 in /homepages/XXXXXXXX/htdocs/piwik/core/DataTable.php on line 470

Backtrace -->
#0 Piwik_ErrorHandler(…) called at [/homepages/XXXXXXXX/htdocs/piwik/core/DataTable.php:470]#1 Piwik_DataTable->getRowFromLabel(…) called at [/homepages/XXXXXXXX/htdocs/piwik/core/DataTable.php:513]#2 Piwik_DataTable->getFilteredTableFromLabel(…) called at [/homepages/XXXXXXXX/htdocs/piwik/core/DataTable/Array.php:252]#3 Piwik_DataTable_Array->getFilteredTableFromLabel(…) called at [/homepages/XXXXXXXX/htdocs/piwik/core/API/DataTableManipulator/LabelFilter.php:72]#4 Piwik_API_DataTableManipulator_LabelFilter->filter(…) called at [/homepages/XXXXXXXX/htdocs/piwik/core/API/ResponseBuilder.php:323]#5 Piwik_API_ResponseBuilder->handleDataTable(…) called at [/homepages/XXXXXXXX/htdocs/piwik/core/API/ResponseBuilder.php:79]#6 Piwik_API_ResponseBuilder->getResponse(…) called at [/homepages/XXXXXXXX/htdocs/piwik/core/API/Request.php:130]#7 Piwik_API_Request->process(…) called at [/homepages/XXXXXXXX/htdocs/piwik/plugins/API/API.php:1195]#8 Piwik_API_API->loadRowEvolutionDataFromAPI(…) called at [/homepages/XXXXXXXX/htdocs/piwik/plugins/API/API.php:1092]#9 Piwik_API_API->getSingleRowEvolution(…) called at [/homepages/XXXXXXXX/htdocs/piwik/plugins/API/API.php:1078]#10 Piwik_API_API->getRowEvolution(…) called at [:]#11 call_user_func_array(…) called at [/homepages/XXXXXXXX/htdocs/piwik/core/API/Proxy.php:190]#12 Piwik_API_Proxy->call(…) called at [/homepages/XXXXXXXX/htdocs/piwik/core/API/Request.php:128]#13 Piwik_API_Request->process(…) called at [/homepages/XXXXXXXX/htdocs/piwik/plugins/CoreHome/DataTableRowAction/RowEvolution.php:162]#14 Piwik_CoreHome_DataTableRowAction_RowEvolution->loadEvolutionReport(…) called at [/homepages/XXXXXXXX/htdocs/piwik/plugins/CoreHome/DataTableRowAction/RowEvolution.php:99]#15 Piwik_CoreHome_DataTableRowAction_RowEvolution->__construct(…) called at [/homepages/XXXXXXXX/htdocs/piwik/plugins/CoreHome/Controller.php:138]#16 Piwik_CoreHome_Controller->getRowEvolutionPopover(…) called at [:]#17 call_user_func_array(…) called at [/homepages/XXXXXXXX/htdocs/piwik/core/FrontController.php:138]#18 Piwik_FrontController->dispatch(…) called at [/homepages/XXXXXXXX/htdocs/piwik/index.php:53]


(Matthieu Aubry) #5

Can you please copy here the lines:

piwik/core/DataTable.php on line 465-475 ?
I’d like to check the code thanks


#6

Hi Matt,

here’s the code:

public function getRowFromLabel( $label )
{
$rowId = $this->getRowIdFromLabel($label);
if(is_int($rowId))
{
return $this->rows[$rowId];
}
return $rowId;
}

/**

Thanks


(Matthieu Aubry) #7

Please make sure you use 1.8.2 files - replace with the new file from: http://dev.piwik.org/trac/browser/trunk/core/DataTable.php (download bottom page)


#8

Hallo,

I use the original 1.8.2 files from the piwik website - I’ve checked it with WinMerge.

I have integrated the Zen-Cart plugin for piwik - maybe this causes the error - but this plugin change no original piwik files.


(Matthieu Aubry) #9

please replace core/DataTable.php by http://dev.piwik.org/trac/export/6546/trunk/core/DataTable.php


#10

Hi,

I have replaced the file, but it’s the same file as I’ve used, and it produces the same error (here in the full length):

Notice: Undefined offset: 1 in /homepages/XXXXXXXX/htdocs/piwik/core/DataTable.php on line 470

Backtrace -->
#0 Piwik_ErrorHandler(…) called at [/homepages/XXXXXXXX/htdocs/piwik/core/DataTable.php:470]#1 Piwik_DataTable->getRowFromLabel(…) called at [/homepages/XXXXXXXX/htdocs/piwik/core/DataTable.php:513]#2 Piwik_DataTable->getFilteredTableFromLabel(…) called at [/homepages/XXXXXXXX/htdocs/piwik/core/DataTable/Array.php:252]#3 Piwik_DataTable_Array->getFilteredTableFromLabel(…) called at [/homepages/XXXXXXXX/htdocs/piwik/core/API/DataTableManipulator/LabelFilter.php:72]#4 Piwik_API_DataTableManipulator_LabelFilter->filter(…) called at [/homepages/XXXXXXXX/htdocs/piwik/core/API/ResponseBuilder.php:323]#5 Piwik_API_ResponseBuilder->handleDataTable(…) called at [/homepages/XXXXXXXX/htdocs/piwik/core/API/ResponseBuilder.php:79]#6 Piwik_API_ResponseBuilder->getResponse(…) called at [/homepages/XXXXXXXX/htdocs/piwik/core/API/Request.php:130]#7 Piwik_API_Request->process(…) called at [/homepages/XXXXXXXX/htdocs/piwik/plugins/API/API.php:1195]#8 Piwik_API_API->loadRowEvolutionDataFromAPI(…) called at [/homepages/XXXXXXXX/htdocs/piwik/plugins/API/API.php:1092]#9 Piwik_API_API->getSingleRowEvolution(…) called at [/homepages/XXXXXXXX/htdocs/piwik/plugins/API/API.php:1078]#10 Piwik_API_API->getRowEvolution(…) called at [:]#11 call_user_func_array(…) called at [/homepages/XXXXXXXX/htdocs/piwik/core/API/Proxy.php:190]#12 Piwik_API_Proxy->call(…) called at [/homepages/XXXXXXXX/htdocs/piwik/core/API/Request.php:128]#13 Piwik_API_Request->process(…) called at [/homepages/XXXXXXXX/htdocs/piwik/plugins/CoreHome/DataTableRowAction/RowEvolution.php:162]#14 Piwik_CoreHome_DataTableRowAction_RowEvolution->loadEvolutionReport(…) called at [/homepages/XXXXXXXX/htdocs/piwik/plugins/CoreHome/DataTableRowAction/RowEvolution.php:99]#15 Piwik_CoreHome_DataTableRowAction_RowEvolution->__construct(…) called at [/homepages/XXXXXXXX/htdocs/piwik/plugins/CoreHome/Controller.php:138]#16 Piwik_CoreHome_Controller->getRowEvolutionPopover(…) called at [:]#17 call_user_func_array(…) called at [/homepages/XXXXXXXX/htdocs/piwik/core/FrontController.php:138]#18 Piwik_FrontController->dispatch(…) called at [/homepages/XXXXXXXX/htdocs/piwik/index.php:53]

Recoverable Error: Argument 1 passed to Piwik_DataTable::addRow() must be an instance of Piwik_DataTable_Row, null given, called in /homepages/XXXXXXXX/htdocs/piwik/core/DataTable.php on line 516 and defined in /homepages/XXXXXXXX/htdocs/piwik/core/DataTable.php on line 593

Backtrace -->
#0 Piwik_ErrorHandler(…) called at [/homepages/XXXXXXXX/htdocs/piwik/core/DataTable.php:593]#1 Piwik_DataTable->addRow(…) called at [/homepages/XXXXXXXX/htdocs/piwik/core/DataTable.php:516]#2 Piwik_DataTable->getFilteredTableFromLabel(…) called at [/homepages/XXXXXXXX/htdocs/piwik/core/DataTable/Array.php:252]#3 Piwik_DataTable_Array->getFilteredTableFromLabel(…) called at [/homepages/XXXXXXXX/htdocs/piwik/core/API/DataTableManipulator/LabelFilter.php:72]#4 Piwik_API_DataTableManipulator_LabelFilter->filter(…) called at [/homepages/XXXXXXXX/htdocs/piwik/core/API/ResponseBuilder.php:323]#5 Piwik_API_ResponseBuilder->handleDataTable(…) called at [/homepages/XXXXXXXX/htdocs/piwik/core/API/ResponseBuilder.php:79]#6 Piwik_API_ResponseBuilder->getResponse(…) called at [/homepages/XXXXXXXX/htdocs/piwik/core/API/Request.php:130]#7 Piwik_API_Request->process(…) called at [/homepages/XXXXXXXX/htdocs/piwik/plugins/API/API.php:1195]#8 Piwik_API_API->loadRowEvolutionDataFromAPI(…) called at [/homepages/XXXXXXXX/htdocs/piwik/plugins/API/API.php:1092]#9 Piwik_API_API->getSingleRowEvolution(…) called at [/homepages/XXXXXXXX/htdocs/piwik/plugins/API/API.php:1078]#10 Piwik_API_API->getRowEvolution(…) called at [:]#11 call_user_func_array(…) called at [/homepages/XXXXXXXX/htdocs/piwik/core/API/Proxy.php:190]#12 Piwik_API_Proxy->call(…) called at [/homepages/XXXXXXXX/htdocs/piwik/core/API/Request.php:128]#13 Piwik_API_Request->process(…) called at [/homepages/XXXXXXXX/htdocs/piwik/plugins/CoreHome/DataTableRowAction/RowEvolution.php:162]#14 Piwik_CoreHome_DataTableRowAction_RowEvolution->loadEvolutionReport(…) called at [/homepages/XXXXXXXX/htdocs/piwik/plugins/CoreHome/DataTableRowAction/RowEvolution.php:99]#15 Piwik_CoreHome_DataTableRowAction_RowEvolution->__construct(…) called at [/homepages/XXXXXXXX/htdocs/piwik/plugins/CoreHome/Controller.php:138]#16 Piwik_CoreHome_Controller->getRowEvolutionPopover(…) called at [:]#17 call_user_func_array(…) called at [/homepages/XXXXXXXX/htdocs/piwik/core/FrontController.php:138]#18 Piwik_FrontController->dispatch(…) called at [/homepages/XXXXXXXX/htdocs/piwik/index.php:53]

Fatal error: Call to a member function getColumn() on a non-object in /homepages/XXXXXXXX/htdocs/piwik/plugins/API/API.php on line 1107


(Matthieu Aubry) #11

line 468 should be
if(is_int($rowId) && isset($this->rows[$rowId]))

then this bug cant happen


#12

Hi,

it’s a shorter error now:

Recoverable Error: Argument 1 passed to Piwik_DataTable::addRow() must be an instance of Piwik_DataTable_Row, integer given, called in /homepages/XXXXXXXX/htdocs/piwik/core/DataTable.php on line 516 and defined in /homepages/XXXXXXXX/htdocs/piwik/core/DataTable.php on line 593

Backtrace -->
#0 Piwik_ErrorHandler(…) called at [/homepages/XXXXXXXX/htdocs/piwik/core/DataTable.php:593]#1 Piwik_DataTable->addRow(…) called at [/homepages/XXXXXXXX/htdocs/piwik/core/DataTable.php:516]#2 Piwik_DataTable->getFilteredTableFromLabel(…) called at [/homepages/XXXXXXXX/htdocs/piwik/core/DataTable/Array.php:252]#3 Piwik_DataTable_Array->getFilteredTableFromLabel(…) called at [/homepages/XXXXXXXX/htdocs/piwik/core/API/DataTableManipulator/LabelFilter.php:72]#4 Piwik_API_DataTableManipulator_LabelFilter->filter(…) called at [/homepages/XXXXXXXX/htdocs/piwik/core/API/ResponseBuilder.php:323]#5 Piwik_API_ResponseBuilder->handleDataTable(…) called at [/homepages/XXXXXXXX/htdocs/piwik/core/API/ResponseBuilder.php:79]#6 Piwik_API_ResponseBuilder->getResponse(…) called at [/homepages/XXXXXXXX/htdocs/piwik/core/API/Request.php:130]#7 Piwik_API_Request->process(…) called at [/homepages/XXXXXXXX/htdocs/piwik/plugins/API/API.php:1195]#8 Piwik_API_API->loadRowEvolutionDataFromAPI(…) called at [/homepages/XXXXXXXX/htdocs/piwik/plugins/API/API.php:1092]#9 Piwik_API_API->getSingleRowEvolution(…) called at [/homepages/XXXXXXXX/htdocs/piwik/plugins/API/API.php:1078]#10 Piwik_API_API->getRowEvolution(…) called at [:]#11 call_user_func_array(…) called at [/homepages/XXXXXXXX/htdocs/piwik/core/API/Proxy.php:190]#12 Piwik_API_Proxy->call(…) called at [/homepages/XXXXXXXX/htdocs/piwik/core/API/Request.php:128]#13 Piwik_API_Request->process(…) called at [/homepages/XXXXXXXX/htdocs/piwik/plugins/CoreHome/DataTableRowAction/RowEvolution.php:162]#14 Piwik_CoreHome_DataTableRowAction_RowEvolution->loadEvolutionReport(…) called at [/homepages/XXXXXXXX/htdocs/piwik/plugins/CoreHome/DataTableRowAction/RowEvolution.php:99]#15 Piwik_CoreHome_DataTableRowAction_RowEvolution->__construct(…) called at [/homepages/XXXXXXXX/htdocs/piwik/plugins/CoreHome/Controller.php:138]#16 Piwik_CoreHome_Controller->getRowEvolutionPopover(…) called at [:]#17 call_user_func_array(…) called at [/homepages/XXXXXXXX/htdocs/piwik/core/FrontController.php:138]#18 Piwik_FrontController->dispatch(…) called at [/homepages/XXXXXXXX/htdocs/piwik/index.php:53]

Fatal error: Call to a member function getColumn() on a non-object in /homepages/XXXXXXXX/htdocs/piwik/plugins/API/API.php on line 1107


#13

Hi,

I was having same probleme.
Now (with this modification) there is no stack trace but only the “loading” that did not ending. when I click on a product in the “product SKU” or “product NAME” part

I’m on 1.8.2 too.


#14

Ok my bad.
That because my sku wasn’t quote ‘SkuNumber’.
Now it’s ok


(Matthieu Aubry) #15

Can you please try to apply the patch:


Index: core/DataTable.php
===================================================================
--- core/DataTable.php	(revision 6564)
+++ core/DataTable.php	(working copy)
@@ -513,6 +513,11 @@
 		$row = $this->getRowFromLabel($label);
 		if ($row !== false)
 		{
+			if(!($row instanceof Piwik_DataTable_Row))
+			{
+				var_dump($this);
+				echo $this;
+			}
 			$newTable->addRow($row);
 		}
 		return $newTable;

Then, please generate the page again. It will now output the datatable. can you please send the output via pastebin.com ?


#16

Hi,

First of all I want to thank you for your efforts.

I’ve made a new installation of Piwik, but now my ecommerce goals don’t work.

When I’ve solved this problem, and the old problem goes on, I will try your patch.


(Matthieu Aubry) #17

Actualyl rather than the patch – pelase wait for the next RC as I think it will fix your problem :slight_smile: please wait a few days and lookup for the Post in this forum!