Undefined index: visit_total_searches (and more)


#1

Hi

After upgrading from 1.6 to 2.1.0, the realtime user tracking panel tells me 5 errors about undefined index. What should I do?

Notice: Undefined index: visit_total_searches in /usr/pkg/share/httpd/htdocs/piwik-2.1.0/plugins/Live/Visitor.php on line 212

Backtrace -->

#0 Piwik\Error::errorHandler(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/plugins/Live/Visitor.php:212]
#1 Piwik\Plugins\Live\Visitor->getNumberOfSearches(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/plugins/Live/Visitor.php:66]
#2 Piwik\Plugins\Live\Visitor->getAllVisitorDetails(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/plugins/Live/API.php:552]
#3 Piwik\Plugins\Live{closure}(…) called at [:]
#4 call_user_func_array(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/core/DataTable.php:407]
#5 Piwik\DataTable->filter(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/core/DataTable.php:452]
#6 Piwik\DataTable->applyQueuedFilters(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/core/API/ResponseBuilder.php:315]
#7 Piwik\API\ResponseBuilder->handleDataTable(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/core/API/ResponseBuilder.php:86]
#8 Piwik\API\ResponseBuilder->getResponse(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/core/API/Request.php:217]
#9 Piwik\API\Request->process(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/plugins/Live/Controller.php:112]
#10 Piwik\Plugins\Live\Controller->getLastVisitsStart(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/plugins/Live/Controller.php:38]
#11 Piwik\Plugins\Live\Controller->widget(…) called at [:]
#12 call_user_func_array(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/core/FrontController.php:521]
#13 Piwik\FrontController->doDispatch(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/core/FrontController.php:84]
#14 Piwik\FrontController->dispatch(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/core/dispatch.php:30]
#15 require_once(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/index.php:47]

Notice: Undefined index: visit_total_events in /usr/pkg/share/httpd/htdocs/piwik-2.1.0/plugins/Live/Visitor.php on line 207

Backtrace -->

#0 Piwik\Error::errorHandler(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/plugins/Live/Visitor.php:207]
#1 Piwik\Plugins\Live\Visitor->getNumberOfEvents(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/plugins/Live/Visitor.php:67]
#2 Piwik\Plugins\Live\Visitor->getAllVisitorDetails(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/plugins/Live/API.php:552]
#3 Piwik\Plugins\Live{closure}(…) called at [:]
#4 call_user_func_array(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/core/DataTable.php:407]
#5 Piwik\DataTable->filter(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/core/DataTable.php:452]
#6 Piwik\DataTable->applyQueuedFilters(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/core/API/ResponseBuilder.php:315]
#7 Piwik\API\ResponseBuilder->handleDataTable(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/core/API/ResponseBuilder.php:86]
#8 Piwik\API\ResponseBuilder->getResponse(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/core/API/Request.php:217]
#9 Piwik\API\Request->process(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/plugins/Live/Controller.php:112]
#10 Piwik\Plugins\Live\Controller->getLastVisitsStart(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/plugins/Live/Controller.php:38]
#11 Piwik\Plugins\Live\Controller->widget(…) called at [:]
#12 call_user_func_array(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/core/FrontController.php:521]
#13 Piwik\FrontController->doDispatch(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/core/FrontController.php:84]
#14 Piwik\FrontController->dispatch(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/core/dispatch.php:30]
#15 require_once(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/index.php:47]

Notice: Undefined index: location_region in /usr/pkg/share/httpd/htdocs/piwik-2.1.0/plugins/Live/Visitor.php on line 301

Backtrace -->

#0 Piwik\Error::errorHandler(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/plugins/Live/Visitor.php:301]
#1 Piwik\Plugins\Live\Visitor->getRegionCode(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/plugins/Live/Visitor.php:291]
#2 Piwik\Plugins\Live\Visitor->getRegionName(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/plugins/Live/Visitor.php:97]
#3 Piwik\Plugins\Live\Visitor->getAllVisitorDetails(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/plugins/Live/API.php:552]
#4 Piwik\Plugins\Live{closure}(…) called at [:]
#5 call_user_func_array(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/core/DataTable.php:407]
#6 Piwik\DataTable->filter(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/core/DataTable.php:452]
#7 Piwik\DataTable->applyQueuedFilters(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/core/API/ResponseBuilder.php:315]
#8 Piwik\API\ResponseBuilder->handleDataTable(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/core/API/ResponseBuilder.php:86]
#9 Piwik\API\ResponseBuilder->getResponse(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/core/API/Request.php:217]
#10 Piwik\API\Request->process(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/plugins/Live/Controller.php:112]
#11 Piwik\Plugins\Live\Controller->getLastVisitsStart(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/plugins/Live/Controller.php:38]
#12 Piwik\Plugins\Live\Controller->widget(…) called at [:]
#13 call_user_func_array(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/core/FrontController.php:521]
#14 Piwik\FrontController->doDispatch(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/core/FrontController.php:84]
#15 Piwik\FrontController->dispatch(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/core/dispatch.php:30]
#16 require_once(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/index.php:47]

Notice: Undefined index: location_region in /usr/pkg/share/httpd/htdocs/piwik-2.1.0/plugins/Live/Visitor.php on line 301

Backtrace -->

#0 Piwik\Error::errorHandler(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/plugins/Live/Visitor.php:301]
#1 Piwik\Plugins\Live\Visitor->getRegionCode(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/plugins/Live/Visitor.php:98]
#2 Piwik\Plugins\Live\Visitor->getAllVisitorDetails(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/plugins/Live/API.php:552]
#3 Piwik\Plugins\Live{closure}(…) called at [:]
#4 call_user_func_array(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/core/DataTable.php:407]
#5 Piwik\DataTable->filter(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/core/DataTable.php:452]
#6 Piwik\DataTable->applyQueuedFilters(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/core/API/ResponseBuilder.php:315]
#7 Piwik\API\ResponseBuilder->handleDataTable(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/core/API/ResponseBuilder.php:86]
#8 Piwik\API\ResponseBuilder->getResponse(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/core/API/Request.php:217]
#9 Piwik\API\Request->process(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/plugins/Live/Controller.php:112]
#10 Piwik\Plugins\Live\Controller->getLastVisitsStart(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/plugins/Live/Controller.php:38]
#11 Piwik\Plugins\Live\Controller->widget(…) called at [:]
#12 call_user_func_array(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/core/FrontController.php:521]
#13 Piwik\FrontController->doDispatch(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/core/FrontController.php:84]
#14 Piwik\FrontController->dispatch(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/core/dispatch.php:30]
#15 require_once(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/index.php:47]

Notice: Undefined index: location_region in /usr/pkg/share/httpd/htdocs/piwik-2.1.0/plugins/Live/Visitor.php on line 301

Backtrace -->

#0 Piwik\Error::errorHandler(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/plugins/Live/Visitor.php:301]
#1 Piwik\Plugins\Live\Visitor->getRegionCode(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/plugins/Live/Visitor.php:291]
#2 Piwik\Plugins\Live\Visitor->getRegionName(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/plugins/Live/Visitor.php:312]
#3 Piwik\Plugins\Live\Visitor->getPrettyLocation(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/plugins/Live/Visitor.php:100]
#4 Piwik\Plugins\Live\Visitor->getAllVisitorDetails(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/plugins/Live/API.php:552]
#5 Piwik\Plugins\Live{closure}(…) called at [:]
#6 call_user_func_array(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/core/DataTable.php:407]
#7 Piwik\DataTable->filter(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/core/DataTable.php:452]
#8 Piwik\DataTable->applyQueuedFilters(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/core/API/ResponseBuilder.php:315]
#9 Piwik\API\ResponseBuilder->handleDataTable(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/core/API/ResponseBuilder.php:86]
#10 Piwik\API\ResponseBuilder->getResponse(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/core/API/Request.php:217]
#11 Piwik\API\Request->process(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/plugins/Live/Controller.php:112]
#12 Piwik\Plugins\Live\Controller->getLastVisitsStart(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/plugins/Live/Controller.php:38]
#13 Piwik\Plugins\Live\Controller->widget(…) called at [:]
#14 call_user_func_array(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/core/FrontController.php:521]
#15 Piwik\FrontController->doDispatch(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/core/FrontController.php:84]
#16 Piwik\FrontController->dispatch(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/core/dispatch.php:30]
#17 require_once(…) called at [/usr/pkg/share/httpd/htdocs/piwik-2.1.0/index.php:47]


#2

I had a crashed table in mysql. I repaired it and the update went fine.

Whould one need to check for that condition: mysqldump piwik > /dev/null will complain if there is a crashed table.