Do not load a report by dimension as a widget so it remembers last used report settings #9398
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
refs #6761
In https://github.com/piwik/piwik/blob/2.15.0/core/ViewDataTable/Factory.php#L107 we load
savedViewDataTableParameters
only if it is not a widget. Why? Widgets are shown in the dashboard and there someone might want to use different settings for a report than in the standalone report on a page. Eg in the report page "Custom Variables" someone might want to see the table with all columns whereas the report in the dashboard should show only the normal table. Also we save dashboard parameters in a separate table.The ReportByDimension component used an existing method
loadWidgetAjax()
which always set the parameterwidget=1
. So we never remembered any setting for reports inReportByDimension
. As there is not much logic we do not have to reuse that method and can simply request the report manually. Thewidget=1
parameter should not be needed.