@tsteur opened this Issue on November 23rd 2022 Member

Using latest Matomo version.

Error: {"message":"Call to undefined method Piwik\DataTable\Map::getRows()","file":"\plugins\/CustomDimensions\/API.php","line":65,"request_id":"f4e73","backtrace":" on \plugins\/CustomDimensions\/API.php(65)\n#0 [internal function]: Piwik\Plugins\CustomDimensions\API->getCustomDimension('1', '51', 'year', '2022-01-01,2022...', false, false, false, '15')\n#1 \core\/API\/Proxy.php(244): call_user_func_array(Array, Array)\n#2 \core\/Context.php(28): Piwik\API\Proxy->Piwik\API\{closure}()\n#3 \core\/API\/Proxy.php(335): Piwik\Context::executeWithQueryParameters(Array, Object(Closure))\n#4 \core\/API\/Request.php(267): Piwik\API\Proxy->call('\\Piwik\\Plugins\\...', 'getCustomDimens...', Array)\n#5 \plugins\/API\/Controller.php(45): Piwik\API\Request->process()\n#6 [internal function]: Piwik\Plugins\API\Controller->index()\n#7 \core\/FrontController.php(631): call_user_func_array(Array, Array)\n#8 \core\/FrontController.php(169): Piwik\FrontController->doDispatch('API', false, Array)\n#9 \core\/dispatch.php(32): Piwik\FrontController->dispatch()\n#10 \index.php(25): require_once('\c...')\n#11 {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(Error))\n#6 \/core\/dispatch.php(32): Piwik\FrontController->dispatch()\n#7 \/index.php(25): require_once('\/c...')\n#8 {main}"}

URL: /?module=API&method=CustomDimensions.getCustomDimension&idSite=51&date=2022-01-01,2022-11-23&period=year&format=json&token_auth=XYZANONYMIZED&idDimension=1&subcategory=Events_Events&idSubtable=15

GET: {"module":"API","method":"CustomDimensions.getCustomDimension","idSite":"51","date":"2022-01-01,2022-11-23","period":"year","format":"json","token_auth":"XYZANONYMIZED","idDimension":"1","subcategory":"Events_Events","idSubtable":"15","filter_limit":100}

@bx80 commented on November 23rd 2022 Contributor

Easy to recreate. Caused by the Custom Dimensions code not handling DataTable\Map objects. Looks like a quick fix so I've submitted a PR.

This Issue was closed on November 28th 2022
Powered by GitHub Issue Mirror