Notice: Undefined index: last_period_total_nb_visits notice message

When I try to view all web sites on a date range period, I get these error messages.

Notice: Undefined index: last_period_total_nb_visits in /homepages/38/d303110840/htdocs/daiquirimachine/wordpress/piwik/core/DataTable.php on line 1345

Backtrace -->
#0 Piwik_ErrorHandler(…) called at [/homepages/38/d303110840/htdocs/daiquirimachine/wordpress/piwik/core/DataTable.php:1345]#1 Piwik_DataTable->getMetadata(…) called at [/homepages/38/d303110840/htdocs/daiquirimachine/wordpress/piwik/plugins/MultiSites/Controller.php:144]#2 Piwik_MultiSites_Controller->getSitesInfo(…) called at [/homepages/38/d303110840/htdocs/daiquirimachine/wordpress/piwik/plugins/MultiSites/Controller.php:37]#3 Piwik_MultiSites_Controller->index(…) called at [:]#4 call_user_func_array(…) called at [/homepages/38/d303110840/htdocs/daiquirimachine/wordpress/piwik/core/FrontController.php:138]#5 Piwik_FrontController->dispatch(…) called at [/homepages/38/d303110840/htdocs/daiquirimachine/wordpress/piwik/index.php:53]

Notice: Undefined index: total_visits_evolution in /homepages/38/d303110840/htdocs/daiquirimachine/wordpress/piwik/core/DataTable.php on line 1345

Backtrace -->
#0 Piwik_ErrorHandler(…) called at [/homepages/38/d303110840/htdocs/daiquirimachine/wordpress/piwik/core/DataTable.php:1345]#1 Piwik_DataTable->getMetadata(…) called at [/homepages/38/d303110840/htdocs/daiquirimachine/wordpress/piwik/plugins/MultiSites/Controller.php:146]#2 Piwik_MultiSites_Controller->getSitesInfo(…) called at [/homepages/38/d303110840/htdocs/daiquirimachine/wordpress/piwik/plugins/MultiSites/Controller.php:37]#3 Piwik_MultiSites_Controller->index(…) called at [:]#4 call_user_func_array(…) called at [/homepages/38/d303110840/htdocs/daiquirimachine/wordpress/piwik/core/FrontController.php:138]#5 Piwik_FrontController->dispatch(…) called at [/homepages/38/d303110840/htdocs/daiquirimachine/wordpress/piwik/index.php:53]

I’ve this error also:

  1. upgraded from 1.8.3 to 1.8.4
  2. in the browser was told to do the DB update manually, which I did (1)
  3. on the settings page this error does not show

on request I could provide more info

(1)

php index.php – “module=CoreUpdater”
*** Update ***

Database Upgrade Required

Your Piwik database is out-of-date, and must be upgraded before you can
continue.

Piwik database will be upgraded from version 1.8.3 to the new version 1.8.4.

The database upgrade process may take a while, so please be patient.

Piwik has been successfully updated!

Thank you for the report!

Can you please try the change to one file:


Index: piwik/core/DataTable.php
===================================================================
--- a/piwik/core/DataTable.php
+++ b/piwik/core/DataTable.php
@@ -1343,4 +1343,8 @@
         public function getMetadata( $name )
         {
+                if (!isset($this->metadata[$name]))
+                {
+                        return false;
+                }
                 return $this->metadata[$name];
         }

Does it fix the problem? is everything else working correctly?

Nope sorry I opened up the file and my eyes glazed over. Please post a fixed file and I will download and replace it.

Thanks

Tom

On first glance: yes, it fixes the error on that one page

will report later for more errors, when I’ve time
THX for fast response

[b]Replace core/DataTable.php with this new file: http://dev.piwik.org/svn/tags/1.8.4/core/DataTable.php[/b]

We’ve re-packaged 1.8.4 with this fix but some users would have downloaded the file with the bug. The bug only appears on the All Websites dashboard with date range selected.

spotted another issue :frowning:

sorry for my unprofessional reporting, doing something else:

on page: Visitors > Locations & Providers
error: Mysqli statement execute error : Fehler 28 (Speicher-Engine)

Backtrace:
#0 /piwik/libs/Zend/Db/Statement.php(300): Zend_Db_Statement_Mysqli->execute(Array)
#1 …/piwik/libs/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#2 …/piwik/plugins/Actions/Actions.php(767): Zend_Db_Adapter_Abstract->query(’???SELECT???..’, Array)
#3 …/piwik/plugins/Actions/Actions.php(672): Piwik_Actions->archiveDayQueryProcess(‘log_visit.%s as…’, Array, ‘log_visit.visit…’, ’15 DESC, log
…’, ‘log_visit.%s, i…’, ‘visit_exit_idac…’, Object(Piwik_ArchiveProcessing_Day), Object(Piwik_RankingQuery))
#4 …/piwik/libs/Event/Dispatcher.php(284): Piwik_Actions->archiveDay(Object(Piwik_Event_Notification))
#5 …/piwik/core/PluginsManager.php(668): Event_Dispatcher->postNotification(Array, Array)
#6 …/piwik/core/ArchiveProcessing/Day.php(45): Piwik_PostEvent()
#7 …/piwik/core/ArchiveProcessing.php(498): Piwik_ArchiveProcessing_Day->compute(Object(Piwik_Event_Notification), false, false)
#8 …/piwik/core/Archive/Single.php(226): Piwik_ArchiveProcessing->launchArchiving(‘ArchiveProcessi…’, Object(Piwik_ArchiveProcessing_Day))
#9 …/piwik/core/Archive/Single.php(256): Piwik_Archive_Single->prepareArchive()
#10 …/piwik/core/Archive/Single.php(447): Piwik_Archive_Single->get()
#11 …/piwik/core/ArchiveProcessing/Period.php(95): Piwik_Archive_Single->getNumeric()
#12 …/piwik/core/ArchiveProcessing/Period.php(49): Piwik_ArchiveProcessing_Period->archiveNumericValuesGeneral(‘nb_visits’, ‘numeric’)
#13 …/piwik/core/ArchiveProcessing/Period.php(302): Piwik_ArchiveProcessing_Period->archiveNumericValuesSum(‘nb_visits’)
#14 …/piwik/core/ArchiveProcessing/Period.php(269): Piwik_ArchiveProcessing_Period->isThereSomeVisits(Array, ‘sum’)
#15 …/piwik/core/ArchiveProcessing.php(498): Piwik_ArchiveProcessing_Period->compute(Array)
#16 …/piwik/core/Archive/Single.php(226): Piwik_ArchiveProcessing->launchArchiving()
#17 …/piwik/core/Archive/Single.php(256): Piwik_Archive_Single->prepareArchive()
#18 …/piwik/core/Archive/Single.php(447): Piwik_Archive_Single->get()
#19 …/piwik/core/ArchiveProcessing/Period.php(95): Piwik_Archive_Single->getNumeric()
#20 …/piwik/core/ArchiveProcessing/Period.php(49): Piwik_ArchiveProcessing_Period->archiveNumericValuesGeneral(‘nb_visits’, ‘numeric’)
#21 …/piwik/core/ArchiveProcessing/Period.php(302): Piwik_ArchiveProcessing_Period->archiveNumericValuesSum(‘nb_visits’)
#22 …/piwik/core/ArchiveProcessing/Period.php(269): Piwik_ArchiveProcessing_Period->isThereSomeVisits(Array, ‘sum’)
#23 …/piwik/core/ArchiveProcessing.php(498): Piwik_ArchiveProcessing_Period->compute(Array)
#24 …/piwik/core/Archive/Single.php(226): Piwik_ArchiveProcessing->launchArchiving()
#25 …/piwik/core/Archive/Single.php(256): Piwik_Archive_Single->prepareArchive()
#26 …/piwik/core/Archive/Single.php(447): Piwik_Archive_Single->get()
#27 …/piwik/core/ArchiveProcessing/Period.php(315): Piwik_Archive_Single->getNumeric()
#28 …/piwik/core/ArchiveProcessing/Period.php(269): Piwik_ArchiveProcessing_Period->isThereSomeVisits(‘nb_visits’, ‘numeric’)
#29 …/piwik/core/ArchiveProcessing.php(498): Piwik_ArchiveProcessing_Period->compute(‘nb_visits’)
#30 …/piwik/core/Archive/Single.php(226): Piwik_ArchiveProcessing->launchArchiving()
#31 …/piwik/core/Archive/Single.php(256): Piwik_Archive_Single->prepareArchive()
#32 …/piwik/core/Archive/Single.php(447): Piwik_Archive_Single->get()
#33 …/piwik/core/Archive/Single.php(490): Piwik_Archive_Single->getNumeric()
#34 …/piwik/plugins/UserCountry/API.php(68): Piwik_Archive_Single->getDataTableFromNumeric(‘UserCountry_dis…’, ‘numeric’)
#35 …/piwik/core/API/Proxy.php(190): Piwik_UserCountry_API->getNumberOfDistinctCountries(‘UserCountry_dis…’)
#36 …/piwik/core/API/Request.php(128): Piwik_API_Proxy->call(‘UserCountry_dis…’)
#37 …/piwik/core/Controller.php(347): Piwik_API_Request->process(‘1’, ‘range’, ‘last7’, false)
#38 …/piwik/plugins/UserCountry/Controller.php(67): Piwik_Controller->getNumericValue(Array, Array)
#39 …/piwik/plugins/UserCountry/Controller.php(24): Piwik_UserCountry_Controller->getNumberOfDistinctCountries(‘Piwik_UserCount…’, ‘getNumberOfDist…’, Array)
#40 …/piwik/core/FrontController.php(138): Piwik_UserCountry_Controller->index()
#41 …/piwik/index.php(53): Piwik_FrontController->dispatch(‘UserCountry.get…’)
#42 {main}

I had the same problem.
I edited the file and it solved the problem.
No other bug in sight for the moment.

about my message (September 16, 2012 01:49AM)

I could not reproduce yet (tried 3x)

Thanks that fixed it.

Is there any way to increase the time out to more than 30 seconds? I have another installation that now times out before being able to retrieve the full listing of all web sites. There are 32 sites on that particular installation.

Thanks

Is there any way to increase the time out to more than 30 seconds?

see http://piwik.org/faq/troubleshooting/#faq_103

Thanks I appreciate it.

Ok I located the line in my php.ini file and changed it. Now I get this error message.

Notice: Undefined index: last_period_total_nb_visits in /home/lakutist/public_html/margaritamakerextreme.com/piwik/core/DataTable.php on line 1345

Backtrace -->
#0 Piwik_ErrorHandler(…) called at [/home/lakutist/public_html/margaritamakerextreme.com/piwik/core/DataTable.php:1345]#1 Piwik_DataTable->getMetadata(…) called at [/home/lakutist/public_html/margaritamakerextreme.com/piwik/plugins/MultiSites/Controller.php:144]#2 Piwik_MultiSites_Controller->getSitesInfo(…) called at [/home/lakutist/public_html/margaritamakerextreme.com/piwik/plugins/MultiSites/Controller.php:37]#3 Piwik_MultiSites_Controller->index(…) called at [:]#4 call_user_func_array(…) called at [/home/lakutist/public_html/margaritamakerextreme.com/piwik/core/FrontController.php:138]#5 Piwik_FrontController->dispatch(…) called at [/home/lakutist/public_html/margaritamakerextreme.com/piwik/index.php:53]

There is an error. Please report the message (Piwik 1.8.4) and full backtrace in the Piwik forums (please do a Search first as it might have been reported already!).

Notice: Undefined index: total_visits_evolution in /home/lakutist/public_html/margaritamakerextreme.com/piwik/core/DataTable.php on line 1345

Backtrace -->
#0 Piwik_ErrorHandler(…) called at [/home/lakutist/public_html/margaritamakerextreme.com/piwik/core/DataTable.php:1345]#1 Piwik_DataTable->getMetadata(…) called at [/home/lakutist/public_html/margaritamakerextreme.com/piwik/plugins/MultiSites/Controller.php:146]#2 Piwik_MultiSites_Controller->getSitesInfo(…) called at [/home/lakutist/public_html/margaritamakerextreme.com/piwik/plugins/MultiSites/Controller.php:37]#3 Piwik_MultiSites_Controller->index(…) called at [:]#4 call_user_func_array(…) called at [/home/lakutist/public_html/margaritamakerextreme.com/piwik/core/FrontController.php:138]#5 Piwik_FrontController->dispatch(…) called at [/home/lakutist/public_html/margaritamakerextreme.com/piwik/index.php:53]

Just curious if you have had a chance to address my comment above.

Thanks

The solution is at: 301 Moved Permanently

Great that fixed it.

Thanks

I had the same problem.

Thanks I appreciate it.

you’re welcome!