diff options
author | Thomas Steur <tsteur@users.noreply.github.com> | 2019-05-20 12:29:59 +0300 |
---|---|---|
committer | diosmosis <diosmosis@users.noreply.github.com> | 2019-05-20 12:29:59 +0300 |
commit | 3edc58745b39793ef9298edd5a81b2fcba8de1fe (patch) | |
tree | 21dc31544fd29cebc8d00af1cbcb8f8fcac1959a /plugins/Events/Reports | |
parent | 17ca84d486ee44662e42d10f8c3d18d7ab6d3bbc (diff) |
fix Unsupported pivot dimension when switching between related event reports (#14348)
fix https://github.com/matomo-org/matomo/issues/9716
Diffstat (limited to 'plugins/Events/Reports')
-rw-r--r-- | plugins/Events/Reports/Base.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/plugins/Events/Reports/Base.php b/plugins/Events/Reports/Base.php index 005e1dda5a..945dc219d6 100644 --- a/plugins/Events/Reports/Base.php +++ b/plugins/Events/Reports/Base.php @@ -9,6 +9,7 @@ namespace Piwik\Plugins\Events\Reports; use Piwik\EventDispatcher; +use Piwik\Common; use Piwik\Plugin\ViewDataTable; use Piwik\Plugins\Events\API; use Piwik\Plugins\Events\Columns\Metrics\AverageEventValue; @@ -40,6 +41,16 @@ abstract class Base extends \Piwik\Plugin\Report public function configureView(ViewDataTable $view) { + if (Common::getRequestVar('secondaryDimension')) { + foreach (['pivotBy', 'pivotByColumn'] as $property) { + $index = array_search($property, $view->requestConfig->overridableProperties); + if ($index) { + unset($view->requestConfig->overridableProperties[$index]); + } + } + $view->requestConfig->overridableProperties = array_values($view->requestConfig->overridableProperties); + } + $this->configureFooterMessage($view); } |