You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BugFor errors / faults / flaws / inconsistencies etc.MajorIndicates the severity or impact or benefit of an issue is much higher than normal but not critical.
As explained on the forum (http://forum.piwik.org/read.php?2,92955), there is a weird behaviour when using getUsersAccessFromSite when there is only on user who has rights on a website.
Expected output, with only one user (named admin):
A test I made was to wrap $return with an array definition, which looks like working for the API, but breaks other features in the core piwik obviously (for instance on the user listing page).
Nevertheless, the patch is
I think these are both the same root cause, the wrong re-write of the data when there's only one element.
Removing and adding widget solves problem. But only for a short time, until user selects one column(metrics) for graph. For example (avg_time_on_site).
1) Then calling API VisitsSummary.get results in table with single column. avg_time_on_site
2) After that API\ResponseBuilder collapses it according to
$columns = $dataTable->getFirstRow()->getColumns();
if(count($columns) == 1)
{
$values = array_values($columns);
return $values[0];
}
3) The result is non-object and have no getFirstRow() function
I solved it adding some extra columns to visits summary to be present all the time:
file: plugins/VisitsSummary/API.php line 62
$columns = array_merge($columns, $tempColumns, array('nb_visits', 'nb_uniq_visitors'));
But it may cause some bugs I believe. So if this bug explanation makes sense - please tell how to fix that correct.
BugFor errors / faults / flaws / inconsistencies etc.MajorIndicates the severity or impact or benefit of an issue is much higher than normal but not critical.
As explained on the forum (http://forum.piwik.org/read.php?2,92955), there is a weird behaviour when using getUsersAccessFromSite when there is only on user who has rights on a website.
Expected output, with only one user (named admin):
Actual output:
Two users:
A test I made was to wrap $return with an array definition, which looks like working for the API, but breaks other features in the core piwik obviously (for instance on the user listing page).
Nevertheless, the patch is
which produces the output:
Keywords: usersmanager accessfromsite
The text was updated successfully, but these errors were encountered: