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

Fatal error: Impossible to invoke a method ("getRows") on a boolean variable in Actions.getDownloads with format=html #20167

Closed
tsteur opened this issue Jan 7, 2023 · 2 comments
Labels
invalid Indicates that an issue or pull request is no longer relevant.

Comments

@tsteur
Copy link
Member

tsteur commented Jan 7, 2023

Getting fatal error see details below

Error: {"message":"Impossible to invoke a method ("getRows") on a boolean variable ("").","file":"/plugins/CoreVisualizations/templates/_dataTableViz_htmlTable.twig","line":23,"request_id":"fb2d5","backtrace":" on /plugins/CoreVisualizations/templates/_dataTableViz_htmlTable.twig(23)\n#0 /tmp/templates_c/a2/a29dbd96da7e6760f554c05ce3805807dcf5299f43a7961caa864ace7b911715.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_48555e24c74f40810f5eeb59627fca3b4fb07d0f1207a4357d503e89e171bc34->doDisplay(Array, Array)\n#2 /vendor/twig/twig/src/Template.php(367): Twig\Template->displayWithErrorHandling(Array, Array)\n#3 /tmp/templates_c/a2/a29dbd96da7e6760f554c05ce3805807dcf5299f43a7961caa864ace7b911715.php(280): Twig\Template->display(Array)\n#4 /vendor/twig/twig/src/Template.php(394): __TwigTemplate_48555e24c74f40810f5eeb59627fca3b4fb07d0f1207a4357d503e89e171bc34->doDisplay(Array, Array)\n#5 /vendor/twig/twig/src/Template.php(367): Twig\Template->displayWithErrorHandling(Array, Array)\n#6 /tmp/templates_c/b3/b3776cd584957b0bf47259e998e5d5d15211875030884867096ed2935e5b26e8.php(258): Twig\Template->display(Array)\n#7 /vendor/twig/twig/src/Template.php(394): __TwigTemplate_1705173160822dd32a5614400e4882f3653de9cb3154b7fdec96cad6e660b6ec->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(277): 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(320): 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\GetDownloads))\n#18 /core/FrontController.php(631): call_user_func_array(Array, Array)\n#19 /core/FrontController.php(169): Piwik\FrontController->doDispatch('Actions', 'getDownloads', Array)\n#20 /core/dispatch.php(32)
User login: christoph

URL: /index.php?date=2022-12-13&viewDataTable=table&module=Actions&format=html&action=getDownloads&idSite=2&period=day&random=6594&search_recursive=1&keep_totals_row=0&filter_sort_column=nb_visits&filter_sort_order=desc&filter_column_recursive=label&filter_pattern_recursive=file&filter_offset=0&filter_limit=-1&flat=0&totals=1

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

@tsteur tsteur added Potential Bug Something that might be a bug, but can't be reproduced (yet). To Triage An issue awaiting triage by a Matomo core team member labels Jan 7, 2023
@bx80
Copy link
Contributor

bx80 commented Jan 8, 2023

Hi @tsteur, thanks for the back trace.

Using the provided URL on a local instance this works for me without error, both with and without data present.

From the code it looks like the datatable might be passing the 'hasAnyData()` check but doesn't actually have any returnable rows. Might be something specific to the data.

Can the issue be recreated consistently or with any other dataset?

@bx80 bx80 added the Waiting for user feedback Indicates the Matomo team is waiting for feedback from the author or other users. label Jan 8, 2023
@tsteur
Copy link
Member Author

tsteur commented Jan 9, 2023

I can definitely reproduce it in that specific account. Viewing the report via the UI works. Exporting as XML and HTML too. After digging deeper seeing this might be actually caused by a special plugin of ours where it fetches data from the demo site. I'll close this one and will create an internal Jira issue.

Thanks for that 💯

@tsteur tsteur closed this as completed Jan 9, 2023
@tsteur tsteur added invalid Indicates that an issue or pull request is no longer relevant. and removed Waiting for user feedback Indicates the Matomo team is waiting for feedback from the author or other users. Potential Bug Something that might be a bug, but can't be reproduced (yet). To Triage An issue awaiting triage by a Matomo core team member labels Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid Indicates that an issue or pull request is no longer relevant.
Projects
None yet
Development

No branches or pull requests

2 participants