diff options
author | Thomas Steur <tsteur@users.noreply.github.com> | 2018-12-26 02:32:05 +0300 |
---|---|---|
committer | diosmosis <diosmosis@users.noreply.github.com> | 2018-12-26 02:32:05 +0300 |
commit | 5f28571535178851fc42f7f9c07655875b7e994f (patch) | |
tree | 5e1754745d4a3e21bac3940f2a0f22966f5699f6 /plugins/Insights | |
parent | 08d623c7ee5b67d779454f179bfacc71a295ab73 (diff) |
Do not fetch totals for insights (#13891)
* Do not fetch totals for insights
Got this error warning
> WARNING: Trying to add two strings in DataTable\Row::sumRowArray: 35.8% + 48.6% for row # ['label' => -2, 'nb_visits' => 379, 'growth_percent' => '35.8%', 'growth_percent_numeric' => '35.8', 'grown' => 1, 'value_old' => 162, 'value_new' => 220, 'difference' => 58, 'importance' => 58, 'isDisappeared' => , 'isNew' => , 'isMover' => 1] [] [idsubtable = ]<br />
* also do not fetch totals for movers and shakers
* Update Model.php
* by default fetch totals only when html tables are requested
* ensure to not fetch totals for any other visualisation but htmltable
* update doc
Diffstat (limited to 'plugins/Insights')
-rw-r--r-- | plugins/Insights/API.php | 1 | ||||
-rw-r--r-- | plugins/Insights/Model.php | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/plugins/Insights/API.php b/plugins/Insights/API.php index 9a7af20398..dd43c9fc0c 100644 --- a/plugins/Insights/API.php +++ b/plugins/Insights/API.php @@ -322,6 +322,7 @@ class API extends \Piwik\Plugin\API 'period' => $period, 'format' => 'original', 'reportUniqueId' => $reportId, + 'totals' => 0 ); if (!empty($segment)) { diff --git a/plugins/Insights/Model.php b/plugins/Insights/Model.php index d7687e2f90..d4ebf307ba 100644 --- a/plugins/Insights/Model.php +++ b/plugins/Insights/Model.php @@ -41,7 +41,8 @@ class Model 'period' => $period, 'date' => $date, 'filter_limit' => 1000, - 'showColumns' => $metric + 'showColumns' => $metric, + 'totals' => 0 ); if (!empty($segment)) { |