The widget "Visits Overview (with graph)" does not save the selected metrics. "Visits Over Time" on the other hand does. It would be nice if both would save the selected metrics.
Also, is it possible that dashboards can't be deleted? Or is it just me who can't figure out how?
I investigated the issue further: When you add a metric in the widget "Visits Overview (with graph)", it stores the column in the table piwik_user_dashboard but it looks like it doesn't read the value when loading the widget.
When avg_time_generation is picked, this is also stored in the column-array in piwik_user_dashboard but when you reload the dashboard it shows the error "The report 'avg_time_generation' was requested but it is not available at this stage. You may also disable the related plugin (avg) to avoid this error.". The only way to fix this is to edit the JSON in piwik_user_dashboard, which has brought me to understand the issue the way I describe it now.
Stefan, I set you as the owner of the ticket. Could you please have a look?
In 16fb8c92cc1e0edf78799bcd412b0ef9c4b5a3df: refs #4007 sparklines can't handle columns parameter
That should solve this issue. Small explenation:
The saved columns are attached to the complete request for the visitsummary index action (when changing the selected columns only the evolution graph is refreshed).
The method throwing the error is: https://github.com/piwik/piwik/blob/master/plugins/VisitsSummary/Controller.php#L89
The called api method can't handle the request for avg_time_generation
In 84fb1bf34ae5f2fb8b1bc28f6219aeb5788518aa: fixes #4007
In 9f7b1646a9b34612d31b2058c43dca7aa9dd6a02: refs #4007 in branch 1.X, an alternative fix for this issue has been committed. revert this one in order avoid merge confusion.
In 31749179c65239d77a50ba6c768130a22bd014e2: refs #4007 this should have been in 84fb1bf34ae5f2fb8b1bc28f6219aeb5788518aa
what i did commit in 84fb1bf34ae5f2fb8b1bc28f6219aeb5788518aa was the first step towards making piwik work again in ie8. sorry for the mix up.
Thanks for investigating, Stefan. I pushed the fix down to the spot where you identified the issue. I hope that's OK.
Also, I fixed the other issue that selected columns are not restored.
I reverted the fix in master and pushed everything to 1.X - that's what Matt said would be the best way to do it if we want to release quickly (he said that in general, not related to this issue). We will later merge 1.X into master in order to make the fix available there.