From 8f8511c9cf77c96458249e8b867f0ebe93b79ef9 Mon Sep 17 00:00:00 2001 From: Justin Velluppillai Date: Thu, 16 Dec 2021 16:31:55 +1300 Subject: Merge 4.6.x patches back to main branch (#18508) * Fix for misaligned evolution trend icons (#18323) * Aligned evolution trend icons, text tweak * Update plugins/MultiSites/angularjs/dashboard/dashboard.directive.less Co-authored-by: Stefan Giehl * Hide feedback banner in zen mode (#18329) * [Vue] 4.6.0 fixes (#18334) * feedback plugin may not be loaded * fix copy paste * async/await not supported * built UMDs * [Vue] use jQuery click for expand on click (#18341) * use jQuery click for expand on click * undo submodule change * 4.6.0-rc2 * [Vue] fix modal notification placement (#18377) * Use separate div in modals to display notifications otherwise Vue will erase modal content when initializing NotificationGroup component. * built vue files * Updating version to 4.6.0 * [Vue] date picker viewDate property is not kept up to date (#18385) * viewDate ref is not kept up to date * rebuild corehome * 4.6.1-rc1 * 4.6.1 * [Vue] emit/broadcast on scope the method was called on not rootScope (#18419) * emit/broadcast on correct scope in wrapper * rebuild vue * remove plugin.json from CoreVue, it is not needed and causes some UI tests to fail (#18421) * Ensure UTF8mb4 conversion command always enables tracking again (#18444) * Ensure UTF8mb4 conversion command always enables tracking again * apply review feedback * small code improvement * Ignore segment errors in update script (#18455) * 4.6.2-rc1 * Ensure update to 4.6.2 removes some files (#18473) * 4.6.2 release! * built vue files Co-authored-by: Ben Burgess <88810029+bx80@users.noreply.github.com> Co-authored-by: Stefan Giehl Co-authored-by: dizzy Co-authored-by: Matthieu Aubry Co-authored-by: justinvelluppillai --- core/Updates/4.6.0-b4.php | 6 +++- core/Updates/4.6.2-rc2.php | 31 ++++++++++++++++++++ .../vue/src/ExpandOnClick/ExpandOnClick.ts | 1 - plugins/CoreHome/vue/src/Matomo/Matomo.adapter.ts | 1 + plugins/CoreUpdater/Commands/ConvertToUtf8mb4.php | 33 +++++++++++----------- 5 files changed, 54 insertions(+), 18 deletions(-) create mode 100644 core/Updates/4.6.2-rc2.php diff --git a/core/Updates/4.6.0-b4.php b/core/Updates/4.6.0-b4.php index 72b2ce0c6a..3c517f997d 100644 --- a/core/Updates/4.6.0-b4.php +++ b/core/Updates/4.6.0-b4.php @@ -52,7 +52,11 @@ class Updates_4_6_0_b4 extends PiwikUpdates $segmentStrings = Rules::getSegmentsToProcess([$idSite]); foreach ($segmentStrings as $segmentString) { - $segment = new Segment($segmentString, [$idSite]); + try { + $segment = new Segment($segmentString, [$idSite]); + } catch (\Exception $e) { + continue; + } if ($segment->getOriginalString() === $segment->getString()) { continue; } diff --git a/core/Updates/4.6.2-rc2.php b/core/Updates/4.6.2-rc2.php new file mode 100644 index 0000000000..26aec321c3 --- /dev/null +++ b/core/Updates/4.6.2-rc2.php @@ -0,0 +1,31 @@ +writeln("\n" . Piwik::translate('Disabling Matomo Tracking')); - $config = Config::getInstance(); $config->Tracker['record_statistics'] = '0'; $config->forceSave(); } $output->writeln("\n" . Piwik::translate('CoreUpdater_ConsoleStartingDbUpgrade')); - foreach ($queries as $query) { - $output->write("\n" . 'Executing ' . $query . '... '); - Db::get()->exec($query); - $output->write(' done.'); - } - - $output->writeln("\n" . 'Updating used database charset in config.ini.php.'); - $config = Config::getInstance(); - $config->database['charset'] = 'utf8mb4'; - - if (!$keepTracking) { - $output->writeln("\n" . Piwik::translate('Enabling Matomo Tracking')); - $config->Tracker['record_statistics'] = '1'; + try { + foreach ($queries as $query) { + $output->write("\n" . 'Executing ' . $query . '... '); + Db::get()->exec($query); + $output->write(' done.'); + } + + $output->writeln("\n" . 'Updating used database charset in config.ini.php.'); + $config->database['charset'] = 'utf8mb4'; + } finally { + if (!$keepTracking) { + $output->writeln("\n" . Piwik::translate('Enabling Matomo Tracking')); + $config->Tracker['record_statistics'] = '1'; + } + $config->forceSave(); } - $config->forceSave(); - $this->writeSuccessMessage($output, array('Conversion to utf8mb4 successful.')); } else { -- cgit v1.2.3