I updated a Piwik installation automatically to version 1.12 and now I receive the following error message:
There is an error. Please report the message (Piwik 1.12) and full backtrace in the Piwik forums (please do a Search first as it might have been reported already!).
Notice: Undefined index: sitesearch in C:\inetpub\piwik\core\Site.php on line 256
Backtrace -->
#0 Piwik_ErrorHandler(…) called at [C:\inetpub\piwik\core\Site.php:256] #1 Piwik_Site::getFor(…) called at [C:\inetpub\piwik\core\Site.php:322] #2 Piwik_Site::isSiteSearchEnabledFor(…) called at [C:\inetpub\piwik\plugins\Actions\Actions.php:562] #3 Piwik_Actions->isSiteSearchEnabled(…) called at [C:\inetpub\piwik\plugins\Actions\Actions.php:529] #4 Piwik_Actions->addWidgets(…) called at [:] #5 call_user_func_array(…) called at [C:\inetpub\piwik\libs\Event\Dispatcher.php:284] #6 Event_Dispatcher->postNotification(…) called at [C:\inetpub\piwik\core\PluginsManager.php:674] #7 Piwik_PostEvent(…) called at [C:\inetpub\piwik\core\PluginsFunctions\WidgetsList.php:58] #8 Piwik_WidgetsList::addWidgets(…) called at [C:\inetpub\piwik\core\PluginsFunctions\WidgetsList.php:39] #9 Piwik_WidgetsList::get(…) called at [C:\inetpub\piwik\core\PluginsFunctions\WidgetsList.php:183] #10 Piwik_GetWidgetsList(…) called at [C:\inetpub\piwik\plugins\Dashboard\Controller.php:35] #11 Piwik_Dashboard_Controller->_getDashboardView(…) called at [C:\inetpub\piwik\plugins\Dashboard\Controller.php:46] #12 Piwik_Dashboard_Controller->embeddedIndex(…) called at [:] #13 call_user_func_array(…) called at [C:\inetpub\piwik\core\FrontController.php:125] #14 Piwik_FrontController->dispatch(…) called at [C:\inetpub\piwik\index.php:47]
I must admit - I didn’t realize that the database is a bit larger (a SQL dump has 42.5 MB), so maybe it was too large to update automatically?
Unfortunately the re-run of the update procedure doesn’t work - no database upgrade processed.
The shell command alternative "$ php /path/to/piwik/index.php – “module=CoreUpdater” "
couldn’t be tested because I cannot find the correct command shell on our windows server
(all shells tested give an error message - maybe I am just too stupid to find the correct command shell).
I tried a manual database upgrade as described in the upgrade page but all these commands :
ALTER TABLE `piwik_log_visit` DROP `location_continent`, ADD `location_region` CHAR(2) NULL AFTER `location_country`, ADD `location_city` VARCHAR(255) NULL AFTER `location_region`, ADD `location_latitude` FLOAT(10, 6) NULL AFTER `location_city`, ADD `location_longitude` FLOAT(10, 6) NULL AFTER `location_latitude`;
ALTER TABLE `piwik_log_conversion` DROP `location_continent`, ADD `location_region` CHAR(2) NULL AFTER `location_country`, ADD `location_city` VARCHAR(255) NULL AFTER `location_region`, ADD `location_latitude` FLOAT(10, 6) NULL AFTER `location_city`, ADD `location_longitude` FLOAT(10, 6) NULL AFTER `location_latitude`;
ALTER TABLE `piwik_log_link_visit_action` CHANGE `idaction_url` `idaction_url` INT( 10 ) UNSIGNED NULL DEFAULT NULL;
ALTER TABLE `piwik_log_visit` ADD visit_total_searches SMALLINT(5) UNSIGNED NOT NULL AFTER `visit_total_actions`;
ALTER TABLE `piwik_site` ADD sitesearch TINYINT DEFAULT 1 AFTER `excluded_parameters`, ADD sitesearch_keyword_parameters TEXT NOT NULL AFTER `sitesearch`, ADD sitesearch_category_parameters TEXT NOT NULL AFTER `sitesearch_keyword_parameters`;
UPDATE `piwik_site` SET `sitesearch` = 1;
ALTER TABLE `piwik_log_link_visit_action` CHANGE `idaction_url_ref` `idaction_url_ref` INT( 10 ) UNSIGNED NULL DEFAULT 0;
ALTER TABLE `piwik_log_visit` CHANGE `visit_exit_idaction_url` `visit_exit_idaction_url` INT( 10 ) UNSIGNED NULL DEFAULT 0;
ALTER TABLE piwik_site DROP `feedburnerName`;
ALTER TABLE piwik_site ADD COLUMN excluded_user_agents TEXT NOT NULL AFTER excluded_parameters;
ALTER TABLE piwik_report ADD COLUMN hour tinyint NOT NULL default 0 AFTER period;
ALTER TABLE piwik_site ADD COLUMN `keep_url_fragment` TINYINT NOT NULL DEFAULT 0 AFTER `group`;
ALTER TABLE `piwik_log_link_visit_action` ADD `custom_float` FLOAT NULL DEFAULT NULL;
ALTER TABLE piwik_report ADD COLUMN idsegment INT(11) AFTER description;
UPDATE `piwik_option` SET option_value = '1.12-b16' WHERE option_name = 'version_core';
Error Code: 1142. ALTER command denied to user 'piwikuser'@'localhost' for table 'piwik_log_visit'
Error Code: 1142. ALTER command denied to user 'piwikuser'@'localhost' for table 'piwik_log_conversion'
Error Code: 1142. ALTER command denied to user 'piwikuser'@'localhost' for table 'piwik_log_link_visit_action'
Error Code: 1142. ALTER command denied to user 'piwikuser'@'localhost' for table 'piwik_log_visit'
Your MySQL user obviously doesn’t have the right it needs to change tables. Please ask your system administrator to grant the MySQL user “piwikuser” the correct rights.