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: Call to undefined method getDataTables in ComparisonRowGenerator.php #21352

Closed
tsteur opened this issue Oct 3, 2023 · 1 comment · Fixed by #21360
Closed

Fatal error: Call to undefined method getDataTables in ComparisonRowGenerator.php #21352

tsteur opened this issue Oct 3, 2023 · 1 comment · Fixed by #21360
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@tsteur
Copy link
Member

tsteur commented Oct 3, 2023

Unsure if below is a Matomo 5 regression. I believe we haven't had this issue before but unclear if it's a regression or not.

This fatal error happened on 5.0.0-rc4

Error: {"message":"Call to undefined method Piwik\DataTable::getDataTables()","file":"/plugins/API/Filter/DataComparisonFilter/ComparisonRowGenerator.php","line":48,"request_id":"f68aa","backtrace":" on /plugins/API/Filter/DataComparisonFilter/ComparisonRowGenerator.php(48)\n#0 /plugins/API/Filter/DataComparisonFilter.php(222): Piwik\Plugins\API\Filter\DataComparisonFilter\ComparisonRowGenerator->compareTables(Array, Object(Piwik\DataTable\Map), Object(Piwik\DataTable))\n#1 /core/API/DataTablePostProcessor.php(519): Piwik\Plugins\API\Filter\DataComparisonFilter->compare(Object(Piwik\DataTable\Map))\n#2 /core/API/DataTablePostProcessor.php(124): Piwik\API\DataTablePostProcessor->applyComparison(Object(Piwik\DataTable\Map))\n#3 /core/Plugin/Visualization.php(560): Piwik\API\DataTablePostProcessor->process(Object(Piwik\DataTable\Map))\n#4 /core/Plugin/Visualization.php(193): Piwik\Plugin\Visualization->applyFilters()\n#5 /core/Plugin/Controller.php(258): Piwik\Plugin\Visualization->render()\n#6 /plugins/VisitsSummary/Controller.php(126): Piwik\Plugin\Controller->renderView(Object(Piwik\Plugins\CoreVisualizations\Visualizations\JqplotGraph\Evolution))\n#7 [internal function]: Piwik\Plugins\VisitsSummary\Controller->getEvolutionGraph()\n#8 /core/FrontController.php(637): call_user_func_array(Array, Array)\n#9 /core/FrontController.php(169): Piwik\FrontController->doDispatch('VisitsSummary', 'getEvolutionGra...', Array)\n#10 /core/dispatch.php(32): Piwik\FrontController->dispatch()\n#11 /index.php(25): require_once('/c...')\n#12 {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):

URL: /index.php?date=2023-09-24,2023-10-01&forceView=1&viewDataTable=graphEvolution&module=VisitsSummary&action=getEvolutionGraph&disableLink=0&widget=1&columns%5B%5D=nb_uniq_visitors&columns_to_display%5B%5D=nb_uniq_visitors&evolution_day_last_n=90&comparePeriods%5B%5D=range&compareDates%5B%5D=2023-09-23%2C2023-09-24&idSite=1&period=range

Referrer: /index.php?module=CoreHome&action=index&idSite=1&period=day&date=yesterday

@tsteur tsteur added Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. To Triage An issue awaiting triage by a Matomo core team member labels Oct 3, 2023
@sgiehl sgiehl added this to the 5.0.0 milestone Oct 4, 2023
@sgiehl
Copy link
Member

sgiehl commented Oct 4, 2023

Looks like it tries comparing a Datatable map with a normal datatable for that specific request. The problem seems to be that the graph aims to display the metric nb_uniq_visitors for a range period, where that metric actually isn't available. I'll set up a PR to prevent that error.

@sgiehl sgiehl self-assigned this Oct 4, 2023
@sgiehl sgiehl added Bug For errors / faults / flaws / inconsistencies etc. and removed Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. To Triage An issue awaiting triage by a Matomo core team member labels Oct 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants