New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not fetch totals for insights #13891
Conversation
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 />
Checked on our instance and the notice don't seem to come up anymore. |
Tried to have a closer look. But actually it's a bit confusing how that's currently working: In visualizations (except of HtmlTable)
matomo/core/API/DataTablePostProcessor.php Line 199 in 40d68b9
That means whenever the totals parameter is missing it will be generated, which is also the case when fetching To fully disable total row calculation for Insights, you might need to add matomo/plugins/Insights/Visualizations/Insight.php Lines 48 to 59 in 7e05d97
Summarized it seems like Btw. this variable naming is also bit confusing, or the comment is wrong: matomo/plugins/CoreVisualizations/Visualizations/HtmlTable/Config.php Lines 90 to 95 in 53c4d95
|
cheers @sgiehl fixed it 👍 There was also an issue that when switching visualisation from HtmlTable to Insights it would still send And the |
Code seems to work, looks ok and build passes, will merge. @sgiehl if you want to review more, feel free to do so, will create a new issue or just apply a fix if everyone's on vacation. |
Got this error warning
The totals row should be only needed for HTML table visualisations. Bar and Pie, etc should not need this totals row and therefore disabled it by default so other visualisations don't need to disable it. Makes viewing reports faster...