Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report::getMetricsForTable(): Argument #1 ($dataTable) must be of type Piwik\DataTable, bool given #19785

tsteur opened this issue Sep 28, 2022 · 1 comment
Bug For errors / faults / flaws.


Copy link

tsteur commented Sep 28, 2022

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"}

@tsteur tsteur added the Potential Bug Something that might be a bug, but can't be reproduced (yet). label Sep 28, 2022
Copy link

bx80 commented Sep 30, 2022

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.

@bx80 bx80 added Bug For errors / faults / flaws. and removed Potential Bug Something that might be a bug, but can't be reproduced (yet). labels Sep 30, 2022
@bx80 bx80 added this to the For Prioritization milestone Sep 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Bug For errors / faults / flaws.
None yet

No branches or pull requests

2 participants