@tsteur opened this Issue on July 15th 2021 Member

Error: {"message":"Call to a member function getSubtableDimension() on null","file":"/core\/DataTable\/Filter\/PivotByDimension.php","line":354,"request_id":"d24dc","backtrace":" on /core\/DataTable\/Filter\/PivotByDimension.php(354)\n#0 /core\/DataTable\/Filter\/PivotByDimension.php(169): Piwik\DataTable\Filter\PivotByDimension->setThisReportMetadata(NULL)\n#1 [internal function]: Piwik\DataTable\Filter\PivotByDimension->__construct(Object(Piwik\DataTable\Simple), NULL, 'Referrers.Keywo...', '', 0, 0)\n#2 /core\/DataTable.php(524): ReflectionClass->newInstanceArgs(Array)\n#3 /core\/DataTable\/Map.php(110): Piwik\DataTable->filter('Piwik\\DataTable...', Array)\n#4 /core\/API\/DataTablePostProcessor.php(163): Piwik\DataTable\Map->filter('PivotByDimensio...', Array)\n#5 /core\/API\/DataTablePostProcessor.php(113): Piwik\API\DataTablePostProcessor->applyPivotByFilter(Object(Piwik\DataTable\Map))\n#6 /core\/API\/ResponseBuilder.php(190): Piwik\API\DataTablePostProcessor->process(Object(Piwik\DataTable\Map))\n#7 /core\/API\/ResponseBuilder.php(104): Piwik\API\ResponseBuilder->handleDataTable(Object(Piwik\DataTable\Map))\n#8 /core\/API\/Request.php(272): Piwik\API\ResponseBuilder->getResponse(Object(Piwik\DataTable\Map), 'VisitsSummary', 'getVisits')\n#9 /core\/Context.php(28): Piwik\API\Request->Piwik\API\{closure}()\n#10 /core\/API\/Request.php(273): Piwik\Context::executeWithQueryParameters(Array, Object(Closure))\n#11 /plugins\/API\/Controller.php(46): Piwik\API\Request->process()\n#12 [internal function]: Piwik\Plugins\API\Controller->index()\n#13 /core\/FrontController.php(615): call_user_func_array(Array, Array)\n#14 /core\/FrontController.php(167): Piwik\FrontController->doDispatch('API', false, Array)\n#15 /core\/dispatch.php(32): Piwik\FrontController->dispatch()\n#16 /index.php(25): require_once('/c...')\n#17 {main}","safemode_backtrace":"#0 [internal function]: Piwik\Plugins\Cloud\Controller->safemode(Array)\n#1 \/core\/FrontController.php(615): call_user_func_array(Array, Array)\n#2 \/core\/FrontController.php(167): Piwik\FrontController->doDispatch('Cloud', 'safemode', Array)\n#3 \/core\/FrontController.php(98): Piwik\FrontController->dispatch('CorePluginsAdmi...', 'safemode', Array)\n#4 \/core\/FrontController.php(138): Piwik\FrontController::(Array)\n#5 \/core\/FrontController.php(188): Piwik\FrontController::(Object(Error))\n#6 \/core\/dispatch.php(32): Piwik\FrontController->dispatch()\n#7 \/index.php(25): require_once('\/c...')\n#8 {main}"}

URL: ?token_auth=XYZANONYMIZED&module=API&method=VisitsSummary.getVisits&idSite=1&period=day&date=last14&segment=&pivotBy=Referrers.Keyword&format=json&flat=0&filter_limit=-1

No referrer found (so probably called directly)

I will comment if it happens again.

@sgiehl commented on July 16th 2021 Member

@tsteur this is quite easy to fix. The problem is that the pivotBy filter requires a Report class in order to determine the dimension. Will provide a simple PR to throw a exception in that case.

This Issue was closed on July 18th 2021
Powered by GitHub Issue Mirror