Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Steur <tsteur@users.noreply.github.com>2019-05-20 12:29:59 +0300
committerdiosmosis <diosmosis@users.noreply.github.com>2019-05-20 12:29:59 +0300
commit3edc58745b39793ef9298edd5a81b2fcba8de1fe (patch)
tree21dc31544fd29cebc8d00af1cbcb8f8fcac1959a /plugins/Events
parent17ca84d486ee44662e42d10f8c3d18d7ab6d3bbc (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')
-rw-r--r--plugins/Events/Reports/Base.php11
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);
}