reported in forum
Error: The report 'nb_uniq_pageviews' was requested but it is not available at this stage. You may also disable the related plugin to avoid this error.
Steps to reproduce
1) Add "Visits overview (with graph)" to dashboard
2) Change metrics to plot to 'pageviews'. Graph refreshes.
3) Reload page
Could we avoid this error and fail gracefully, or is the error really not expected?
Here is the trace :
<a href='/0'>#0</a> /.../core/Archive/Single.php(181): Piwik_ArchiveProcessing::getPluginBeingProcessed('nb_pageviews')
<a href='/1'>#1</a> /.../core/Archive/Single.php(266): Piwik_Archive_Single->prepareArchive()
<a href='/2'>#2</a> /.../core/Archive/Single.php(462): Piwik_Archive_Single->get('nb_pageviews', 'numeric')
<a href='/3'>#3</a> /.../core/Archive/Single.php(505): Piwik_Archive_Single->getNumeric('nb_pageviews')
<a href='/4'>#4</a> /.../plugins/VisitsSummary/API.php(88): Piwik_Archive_Single->getDataTableFromNumeric(Array)
<a href='/5'>#5</a> [internal function]: Piwik_VisitsSummary_API->get('359', 'day', 'yesterday', false, Array)
<a href='/6'>#6</a> /.../core/API/Proxy.php(190): call_user_func_array(Array, Array)
<a href='/7'>#7</a> /.../core/API/Request.php(128): Piwik_API_Proxy->call('Piwik_VisitsSum...', 'get', Array)
<a href='/8'>#8</a> /.../plugins/VisitsSummary/Controller.php(98): Piwik_API_Request->process()
<a href='/9'>#9</a> /.../plugins/VisitsSummary/Controller.php(129): Piwik_VisitsSummary_Controller::getVisitsSummary()
<a href='/10'>#10</a> /.../plugins/VisitsSummary/Controller.php(24): Piwik_VisitsSummary_Controller->setSparklinesAndNumbers(Object(Piwik_View))
<a href='/11'>#11</a> [internal function]: Piwik_VisitsSummary_Controller->index()
<a href='/12'>#12</a> /.../core/FrontController.php(138): call_user_func_array(Array, Array)
<a href='/13'>#13</a> /.../index.php(53): Piwik_FrontController->dispatch()
<a href='/14'>#14</a> {main}
(In [7500]) Fixes #3440, make sure Actions metrics are associated w/ an Actions report in Piwik_Archive_Single::getRequestedReportFor and make sure Piwik_VisitsSummary_Controller::getVisitsSummary can handle case where Piwik_API_Request returns false.
There are metrics in the array that do not belong to the Actions plugin, ie.
'sum_time_spent',
'exit_nb_uniq_visitors',
'exit_nb_visits',
'sum_daily_exit_nb_uniq_visitors',
'entry_nb_uniq_visitors',
'sum_daily_entry_nb_uniq_visitors',
'entry_nb_visits',
'entry_nb_actions',
'entry_sum_visit_length',
'entry_bounce_count',
Were this added for a reason?
Vote for revert
They are referenced by Archive.php in the $mappingFromIdToName as actions metrics so I guess I put them in w/ the others. I can see they're not actually archived as numeric metrics, though, by the Actions plugin. I guess I can remove them?
Replying to capedfuzz:
They are referenced by Archive.php in the $mappingFromIdToName as actions metrics so I guess I put them in w/ the others. I can see they're not actually archived as numeric metrics, though, by the Actions plugin. I guess I can remove them?
Sounds good to remove them and only put the actions metrics, this would prevent further issues.
(In [7621]) Refs #3440, remove non-archived metrics from Piwik_Archive::$actionMetrics.
To fix it, maybe could have a test case that used to trigger the error? thoughts?