Error: Undefined index after Update


#1

Hello,

I updated today my Piwik installation from 1.4 to 1.5 and get now the following error:

Undefined index: in /piwik/plugins/Live/API.php on line 160
Backtrace -->
#0 Piwik_ErrorHandler(8, 1 => 'Undefined index: ', 2 => ‘/html/typo3/typo3conf/piwik/piwik/plugins/Live/API.php’, 3 => 160, 4 => array (‘this’ => Piwik_Live_API::__set_state(array()), ‘visitorDetails’ => array (0 => array (‘idvisit’ => ‘3249’, ‘idsite’ => ‘1’, ‘idvisitor’ => ‘‹ž—aåm»’, ‘visitor_localtime’ => ‘10:09:40’, ‘visitor_returning’ => ‘1’, ‘visitor_count_visits’ => ‘2’, ‘visitor_days_since_last’ => ‘14’, ‘visitor_days_since_order’ => ‘0’, ‘visitor_days_since_first’ => ‘14’, ‘visit_first_action_time’ => ‘2011-06-20 08:09:48’, ‘visit_last_action_time’ => ‘2011-06-20 08:14:39’, ‘visit_exit_idaction_url’ => ‘8’, ‘visit_exit_idaction_name’ => ‘1’, ‘visit_entry_idaction_url’ => ‘8’, ‘visit_entry_idaction_name’ => ‘1’, ‘visit_total_actions’ => ‘6’, ‘visit_total_time’ => ‘291’, ‘visit_goal_converted’ => ‘0’, ‘visit_goal_buyer’ => ‘0’, ‘referer_type’ => ‘2’, ‘referer_name’ => ‘Google’, ‘referer_url’ => 'Попередження про переадресування#1 Piwik_Live_API->getCleanedVisitorsFromDetails(array (0 => array (‘idvisit’ => ‘3249’, ‘idsite’ => ‘1’, ‘idvisitor’ => ‘‹ž—aåm»’, ‘visitor_localtime’ => ‘10:09:40’, ‘visitor_returning’ => ‘1’, ‘visitor_count_visits’ => ‘2’, ‘visitor_days_since_last’ => ‘14’, ‘visitor_days_since_order’ => ‘0’, ‘visitor_days_since_first’ => ‘14’, ‘visit_first_action_time’ => ‘2011-06-20 08:09:48’, ‘visit_last_action_time’ => ‘2011-06-20 08:14:39’, ‘visit_exit_idaction_url’ => ‘8’, ‘visit_exit_idaction_name’ => ‘1’, ‘visit_entry_idaction_url’ => ‘8’, ‘visit_entry_idaction_name’ => ‘1’, ‘visit_total_actions’ => ‘6’, ‘visit_total_time’ => ‘291’, ‘visit_goal_converted’ => ‘0’, ‘visit_goal_buyer’ => ‘0’, ‘referer_type’ => ‘2’, ‘referer_name’ => ‘Google’, ‘referer_url’ => ‘http://www.google.it/url?sa=t&source=web&cd=2&ved=0CEUQFjAB&url=http%3A%2F%2Fwww.hotel-interski.com%2Fitaliano%2Fhotel.html&rct=j&q=intersky%20valgardena&ei=HgD_TfX6E8_esgaK9o3zDQ&usg=AFQjCNGlQf1wVfkeViY9Ef69rWPtp9LrJg’, ‘referer_keyword’…#2 Piwik_Live_API->getLastVisitsDetails(‘1’, 1 => ‘day’, 2 => ‘today’, 3 => false, 4 => ‘10’, 5 => false, 6 => false) called at [:]#3 call_user_func_array(array (0 => Piwik_Live_API::__set_state(array()), 1 => ‘getLastVisitsDetails’), 1 => array (0 => ‘1’, 1 => ‘day’, 2 => ‘today’, 3 => false, 4 => ‘10’, 5 => false, 6 => false)) called at [/html/typo3/typo3conf/piwik/piwik/core/API/Proxy.php:179]#4 Piwik_API_Proxy->call(‘Piwik_Live_API’, 1 => ‘getLastVisitsDetails’, 2 => array (‘method’ => ‘Live.getLastVisitsDetails’, ‘idSite’ => ‘1’, ‘filter_limit’ => ‘10’, ‘format’ => ‘php’, ‘serialize’ => ‘0’, ‘disable_generic_filters’ => ‘1’, ‘module’ => ‘Live’, ‘action’ => ‘widget’, ‘widget’ => ‘1’, ‘period’ => ‘day’, ‘date’ => ‘today’)) called at [/html/typo3/typo3conf/piwik/piwik/core/API/Request.php:121]#5 Piwik_API_Request->process(array () called at [/html/typo3/typo3conf/piwik/piwik/plugins/Live/Controller.php:100]#6 Piwik_Live_Controller->getLastVisitsStart(true) called at [/html/typo3/typo3conf/piwik/piwik/plugins/Live/Controller.php:30]#7 Piwik_Live_Controller->widget(array () called at [:]#8 call_user_func_array(array (0 => Piwik_Live_Controller::__set_state(array(‘pluginName’ => ‘Live’, ‘strDate’ => ‘2011-06-20’, ‘date’ => Piwik_Date::__set_state(array(‘timestamp’ => 1308582890, ‘timezone’ => ‘UTC’)), ‘idSite’ => 1, ‘site’ => Piwik_Site::__set_state(array(‘id’ => 1)))), 1 => ‘widget’), 1 => array ()) called at [/html/typo3/typo3conf/piwik/piwik/core/FrontController.php:127]#9 Piwik_FrontController->dispatch(array () called at [/html/typo3/typo3conf/piwik/piwik/index.php:53]


Any idea what’s going on there?

Thanks!

Lukas


(Matthieu Aubry) #2

Lukas

can you please try the following patch?

Index: plugins/Live/API.php

— API.php (revision 4934)
+++ API.php (working copy)
@@ -157,7 +157,7 @@
$visitorDetailsArray = $visitor->getAllVisitorDetails();

		$visitorDetailsArray['siteCurrency'] = $site->getCurrency();
  •   	$visitorDetailsArray['siteCurrencySymbol'] = $currencies[$site->getCurrency()];
    
  •   	$visitorDetailsArray['siteCurrencySymbol'] = @$currencies[$site->getCurrency()];
      	$visitorDetailsArray['serverTimestamp'] = $visitorDetailsArray['lastActionTimestamp'];
      	$dateTimeVisit = Piwik_Date::factory($visitorDetailsArray['lastActionTimestamp'], $timezone);
      	$visitorDetailsArray['serverTimePretty'] = $dateTimeVisit->getLocalized('%time%');

#3

Hi,

yes this solved the error message :slight_smile:

Thank you!


#4

Hello,
I’m getting a some similar error while translating the new strings of 1.7 :

]Notice: Undefined index: isCustomLogo in /home2/program2/public_html/piwik/piwik/tmp/templates_c/%%C3^C3C^C3C9B2C7%%logo.tpl.php on line 10

Backtrace -->
#0 Piwik_ErrorHandler(…) called at [/home2/program2/public_html/piwik/piwik/tmp/templates_c/%%C3^C3C^C3C9B2C7%%logo.tpl.php:10]#1 include(…) called at [/home2/program2/public_html/piwik/piwik/libs/Smarty/Smarty.class.php:1869]#2 Smarty->_smarty_include(…) called at [/home2/program2/public_html/piwik/piwik/tmp/templates_c/%%38^383^383EA889%%header.tpl.php:55]#3 include(…) called at [/home2/program2/public_html/piwik/piwik/libs/Smarty/Smarty.class.php:1869]#4 Smarty->_smarty_include(…) called at [/home2/program2/public_html/piwik/piwik/tmp/templates_c/%%5A^5A5^5A553E34%%manage.tpl.php:8]#5 include(…) called at [/home2/program2/public_html/piwik/piwik/libs/Smarty/Smarty.class.php:1263]#6 Smarty->fetch(…) called at [/home2/program2/public_html/piwik/piwik/core/View.php:138]#7 Piwik_View->render(…) called at [/home2/program2/public_html/piwik/piwik/plugins/TranslationsAdmin/Controller.php:332]#8 Piwik_TranslationsAdmin_Controller->index(…) called at [:]#9 call_user_func_array(…) called at [/home2/program2/public_html/piwik/piwik/core/FrontController.php:138]#10 Piwik_FrontController->dispatch(…) called at [/home2/program2/public_html/piwik/piwik/index.php:53]

Could you suggest a solution?


(Matthieu Aubry) #5

BB_or_bb, make sure all files are uploaded correctly in particular /core/Controller.php
reupload from th epiwik zip.

if after reupload it still does not work, please post here the URL used to see the error?


#6

Thank you matt. I did as you suggested, extracting and uploading Controller.php but no changes. You could see the error here:

http://piwik.programeshqip.org/piwik/index.php?module=TranslationsAdmin&action=index&lang=sq&plugin=all


(Matthieu Aubry) #7

PLease update the plugin to thie latest version: Plugin: Translate Piwik in your own language with this easy to use plugin · Issue #5591 · matomo-org/matomo · GitHub


#8

Hello matt,

Thank you for the tip. I updated the translation plugin and the previous error has gone now. But I see a new one. Instead of the locale’s list it only shows Array, Array, Array, … I checked the /piwik/piwik/plugins/TranslationsAdmin directory and I think there’s one folder missing, the ‘lang’ one. I think I saw such a folder before overwriting the plugin folder.

The first click on translations page it returned:

Warning: require(/home2/program2/public_html/piwik/piwik/lang/Array.php) [function.require]: failed to open stream: No such file or directory in /home2/program2/public_html/piwik/piwik/plugins/TranslationsAdmin/Controller.php on line 175

Backtrace -->
#0 Piwik_ErrorHandler(…) called at [/home2/program2/public_html/piwik/piwik/plugins/TranslationsAdmin/Controller.php:175]#1 Piwik_TranslationsAdmin_Controller::getTranslationArray(…) called at [/home2/program2/public_html/piwik/piwik/plugins/TranslationsAdmin/Controller.php:175]#2 Piwik_TranslationsAdmin_Controller->getTranslationArray(…) called at [/home2/program2/public_html/piwik/piwik/plugins/TranslationsAdmin/Controller.php:267]#3 Piwik_TranslationsAdmin_Controller->index(…) called at [:]#4 call_user_func_array(…) called at [/home2/program2/public_html/piwik/piwik/core/FrontController.php:138]#5 Piwik_FrontController->dispatch(…) called at [/home2/program2/public_html/piwik/piwik/index.php:53]

Fatal error: require() [function.require]: Failed opening required ‘/home2/program2/public_html/piwik/piwik/lang/Array.php’ (include_path=’.:/usr/lib64/php:/usr/lib/php:/usr/share/pear’) in /home2/program2/public_html/piwik/piwik/plugins/TranslationsAdmin/Controller.php on line 175

TIA,

BB_or_bb


#9

The above error is returned when I try to choose --all translation-- to work on.


(Matthieu Aubry) #10

Works for me. Try deleting all files in tmp/* and delete the plugin translationsadmin, reupload again?


#11

Finally it works perfectly for me as well. Thank you very much matt.