Open diosmosis opened 9 years ago
If a report is viewed in the All Columns view or the Goals view, and the table is pivotted
Maybe we could improve the Pivot feature and display a Metric selector, that would let user select the metric being pivotted. User could choose between Actions, Actions per visit, Average time on site, Goal 1 Conv rate, etc.
If we don't show the metric selector, then we could just for now "disable" the pivot feature when "All columns" or "Goals" view is selected for a datatable?
I think this is a good idea, but I think it's unrelated to the failure.
so as first step and scope of this issue: let's simply disable this view so the bug cannot be triggered ie. "disable" the pivot feature when "All columns" or "Goals" view is selected (we would re-investigate later when working on #4776 )
If a report is viewed in the All Columns view or the Goals view, and the table is pivotted, the result is incorrect (w/ no data being displayed).
The pivoting itself appears to work (although the resulting datatable is missing the numeral prefixes, which may be expected, I'm not sure). After the pivoting the DataTablePostProcessor::$callbackBeforeGenericFilters function is called which erases all data in the table. The closure that removes the rows is here: https://github.com/piwik/piwik/blob/master/core/Plugin/Visualization.php#L400