@tsteur opened this Issue on September 28th 2022 Member

Seeing below error on Matomo 4.11. Not sure if it's Cohorts specific or an issue in core.

Error: {"message":"Piwik\Plugin\Report::getMetricsForTable(): Argument #1 ($dataTable) must be of type Piwik\DataTable, bool given, called in \/core\/Plugin\/Visualization.php on line 498","file":"\/core\/Plugin\/Report.php","line":1010,"request_id":"bca35","backtrace":" on \/core\/Plugin\/Report.php(1010)\n#0 \/core\/Plugin\/Visualization.php(498): Piwik\Plugin\Report::getMetricsForTable(false, Object(Piwik\Plugins\Cohorts\Reports\GetCohortsOverTime))\n#1 \/core\/Plugin\/Visualization.php(194): Piwik\Plugin\Visualization->addVisualizationInfoFromMetricMetadata()\n#2 \/core\/Plugin\/Controller.php(257): Piwik\Plugin\Visualization->render()\n#3 \/plugins\/Cohorts\/Controller.php(104): Piwik\Plugin\Controller->renderView(Object(Piwik\Plugins\CoreVisualizations\Visualizations\JqplotGraph\Evolution))\n#4 [internal function]: Piwik\Plugins\Cohorts\Controller->getEvolutionGraph()\n#5 \/core\/FrontController.php(631): call_user_func_array(Array, Array)\n#6 \/core\/FrontController.php(169): Piwik\FrontController->doDispatch('Cohorts', 'getEvolutionGra...', Array)\n#7 \/core\/dispatch.php(32): Piwik\FrontController->dispatch()\n#8 \/index.php(25): require_once('\/c...')\n#9 {main}","safemode_backtrace":"#0 [internal function]: Piwik\Plugins\Cloud\Controller->safemode(Array)\n#1 \/core\/FrontController.php(631): call_user_func_array(Array, Array)\n#2 \/core\/FrontController.php(169): Piwik\FrontController->doDispatch('Cloud', 'safemode', Array)\n#3 \/core\/FrontController.php(100): Piwik\FrontController->dispatch('CorePluginsAdmi...', 'safemode', Array)\n#4 \/core\/FrontController.php(140): Piwik\FrontController::(Array)\n#5 \/core\/FrontController.php(190): Piwik\FrontController::(Object(TypeError))\n#6 \/core\/dispatch.php(32): Piwik\FrontController->dispatch()\n#7 \/index.php(25): require_once('\/c...')\n#8 {main}"}

URL: /index.php?date=2022-12-07&forceView=1&viewDataTable=graphEvolution&module=Cohorts&action=getEvolutionGraph&disableLink=0&widget=1&idSite=1&period=day

Referrer: /index.php?module=CoreHome&action=index&idSite=1&period=day&date=2022-12-07&updated=2

GET: {"date":"2022-12-07","forceView":"1","viewDataTable":"graphEvolution","module":"Cohorts","action":"getEvolutionGraph","disableLink":"0","widget":"1","idSite":"1","period":"day"}

@bx80 commented on September 30th 2022 Contributor

This can be recreated easily using the supplied URL, the date in the future might be the problem as the same URL with a date in the past works correctly. It looks like the core/Plugin/Visualization class is not gracefully handling scenarios where the datatable does not exist, so this issue may exist elsewhere.

Powered by GitHub Issue Mirror