Open tsteur opened 1 year ago
I didn't manage to recreate this. It looks like there might be no data for the filtered rows but the HTML table attempts to render anyway and fails because there is no datatable object. More investigation is needed.
This happened again.
Error: {"message":"Impossible to invoke a method (\"getRows\") on a boolean variable (\"\").","file":"plugins\/CoreVisualizations\/templates\/_dataTableViz_htmlTable.twig","line":23,"request_id":"8b265","backtrace":" on plugins\/CoreVisualizations\/templates\/_dataTableViz_htmlTable.twig(23)\n#0 tmp\/templates_c\/e8\/e89b1c0148b27a7547738c2e480da3f4f6873d4affeebca46e5e305de84f41e4.php(86): twig_get_attribute(Object(Twig\Environment), Object(Twig\Source), false, 'getRows', Array, 'method', false, false, false, 23)\n#1 vendor\/twig\/twig\/src\/Template.php(394): TwigTemplate_876675d8d301ee0d6925699b58adb999478d800e7900a73eae4a4e1305c3cad5->doDisplay(Array, Array)\n#2 vendor\/twig\/twig\/src\/Template.php(367): Twig\Template->displayWithErrorHandling(Array, Array)\n#3 tmp\/templates_c\/e8\/e89b1c0148b27a7547738c2e480da3f4f6873d4affeebca46e5e305de84f41e4.php(280): Twig\Template->display(Array)\n#4 vendor\/twig\/twig\/src\/Template.php(394): TwigTemplate_876675d8d301ee0d6925699b58adb999478d800e7900a73eae4a4e1305c3cad5->doDisplay(Array, Array)\n#5 vendor\/twig\/twig\/src\/Template.php(367): Twig\Template->displayWithErrorHandling(Array, Array)\n#6 tmp\/templates_c\/66\/66ce50690891d1ccc14c156fb7d33abfd7c5f5dcc57a68deca55727ca7a06306.php(258): Twig\Template->display(Array)\n#7 vendor\/twig\/twig\/src\/Template.php(394): __TwigTemplate_26ca2311cd797a5c63110ea5ae44933866c5f55cc0b1568f0f0d79ab01084a7c->doDisplay(Array, Array)\n#8 vendor\/twig\/twig\/src\/Template.php(367): Twig\Template->displayWithErrorHandling(Array, Array)\n#9 vendor\/twig\/twig\/src\/Template.php(379): Twig\Template->display(Array)\n#10 vendor\/twig\/twig\/src\/TemplateWrapper.php(40): Twig\Template->render(Array, Array)\n#11 vendor\/twig\/twig\/src\/Environment.php(280): Twig\TemplateWrapper->render(Array)\n#12 core\/View.php(333): Twig\Environment->render('@CoreHome\/_data...', Array)\n#13 core\/View.php(318): Piwik\View->renderTwigTemplate()\n#14 core\/Plugin\/Visualization.php(271): Piwik\View->render()\n#15 core\/Plugin\/Report.php(329): Piwik\Plugin\Visualization->render()\n#16 plugins\/CoreHome\/Controller.php(60): Piwik\Plugin\Report->render()\n#17 [internal function]: Piwik\Plugins\CoreHome\Controller->renderReportWidget(Object(Piwik\Plugins\Actions\Reports\GetPageUrls))\n#18 core\/FrontController.php(637): call_user_func_array(Array, Array)\n#19 core\/FrontController.php(
URL: /index.php?date=today&viewDataTable=table&module=Actions&format=html&action=getPageUrls&idSite=2&period=day&random=9538&filter_offset=0&totals=1&search_recursive=1&filter_limit=100&filter_sort_column=nb_visits&filter_sort_order=desc&enable_filter_excludelowpop=0&flat=0&keep_totals_row=0&filter_column_recursive=label&filter_pattern_recursive=board
Referrer: /index.php?module=CoreHome&action=index&date=today&period=day&idSite=2
Might be possible to "fix" that by adding an additional check here: https://github.com/matomo-org/matomo/blob/ff812d1faeab4d7f712289b53883b14a4e6910cb/plugins/CoreHome/templates/_dataTable.twig#L5
But actually I wonder why the datatable should be a boolean at that state. I wasn't able to recreate that locally, maybe it's some race condition where the API fetched by the vizualisation doesn't return anything or an error.
This happened again a few times today
Impossible to invoke a method (\"getRows\") on a boolean variable (\"\").","file":"plugins\/CoreVisualizations\/templates\/_dataTableViz_htmlTable.twig","line":23
This bug happened again
This happened again today
Still no clue how to reproduce, but the problem seems to be that a boolean value is set as datatable for the view. Will create a PR to prevent any values other than Datatables to be used there
Reopening as this is still happening. @Stan-vw this was not actually fixed
This fatal error happened on 5.0.0-rc9
Error: {"message":"Impossible to invoke a method (\"getRows\") on a boolean variable (\"\").","file":"\/plugins\/CoreVisualizations\/templates\/_dataTableViz_htmlTable.twig","line":23,"request_id":"a98bb","backtrace":" on \/plugins\/CoreVisualizations\/templates\/_dataTableViz_htmlTable.twig(23)\n#0 \/tmp\/templates_c\/1b\/1bd339f3e07343c88ebd5d07c6e0ddd8.php(86): twig_get_attribute(Object(Twig\Environment), Object(Twig\Source), false, 'getRows', Array, 'method', false, false, false, 23)\n#1 \/vendor\/twig\/twig\/src\/Template.php(394): TwigTemplate_300b6219920b91dfcdf469803ca0ff6c->doDisplay(Array, Array)\n#2 \/vendor\/twig\/twig\/src\/Template.php(367): Twig\Template->displayWithErrorHandling(Array, Array)\n#3 \/tmp\/templates_c\/1b\/1bd339f3e07343c88ebd5d07c6e0ddd8.php(290): Twig\Template->display(Array)\n#4 \/vendor\/twig\/twig\/src\/Template.php(394): TwigTemplate_300b6219920b91dfcdf469803ca0ff6c->doDisplay(Array, Array)\n#5 \/vendor\/twig\/twig\/src\/Template.php(367): Twig\Template->displayWithErrorHandling(Array, Array)\n#6 \/tmp\/templates_c\/92\/9267cd5b18e8e086d2d4f1519f0bcef6.php(251): Twig\Template->display(Array)\n#7 \/vendor\/twig\/twig\/src\/Template.php(394): __TwigTemplate_920ed79520a29d54682a682bca9ae31c->doDisplay(Array, Array)\n#8 \/vendor\/twig\/twig\/src\/Template.php(367): Twig\Template->displayWithErrorHandling(Array, Array)\n#9 \/vendor\/twig\/twig\/src\/Template.php(379): Twig\Template->display(Array)\n#10 \/vendor\/twig\/twig\/src\/TemplateWrapper.php(38): Twig\Template->render(Array)\n#11 \/vendor\/twig\/twig\/src\/Environment.php(280): Twig\TemplateWrapper->render(Array)\n#12 \/core\/View.php(334): Twig\Environment->render('@CoreHome\/_data...', Array)\n#13 \/core\/View.php(319): Piwik\View->renderTwigTemplate()\n#14 \/core\/Plugin\/Visualization.php(275): Piwik\View->render()\n#15 \/core\/Plugin\/Report.php(344): Piwik\Plugin\Visualization->render()\n#16 \/plugins\/CoreHome\/Controller.php(59): Piwik\Plugin\Report->render()\n#17 [internal function]: Piwik\Plugins\CoreHome\Controller->renderReportWidget(Object(Piwik\Plugins\Actions\Reports\GetPageUrls))\n#18 \/core\/FrontController.php(637): call_user_func_array(Array, Array)\n#19 \/core\/FrontController.php(169): Piwik\FrontController->doDispatch('Actions', 'getPageUrls', Array)\n#20 \/core\/dispatch.php(32): Piwik\FrontController->dispatch()\n#21 \/index.php(25): require_once('\/c...')\n#22 {main}","safemode_backtrace":"#0 [internal function]: Piwik\Plugins\Cloud\Controller->safemode(Array)\n#1 \/core\/FrontController.php(637): 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(189): Piwik\FrontController::(Object(Twig\Error\RuntimeError))\n#6 \/core\/dispatch.php(32): Piwik\FrontController->dispatch()\n#7 \/index.php(25): require_once('\/c...')\n#8 {main}"}
URL: /index.php?date=yesterday&viewDataTable=table&module=Actions&format=html&action=getPageUrls&idSite=2&period=day&random=9110&search_recursive=1&filter_sort_column=label&filter_sort_order=desc&filter_column_recursive=label&filter_pattern_recursive=bali&filter_offset=0&filter_limit=5&totals=1
Referrer: /index.php?module=CoreHome&action=index&idSite=2&period=day&date=yesterday
Context
A user was experiencing below error around 20 times yesterday:
Expected Behavior
No fatal error.
Current Behavior
Getting an error in the UI.
Steps to Reproduce (for Bugs)
See information in context that may help to reproduce.
Your Environment
Latest Matomo version.