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 Piwik\\DataTable\\Map::getRows() in CustomDimensions/API.php #20043

Closed
tsteur opened this issue Nov 23, 2022 · 1 comment · Fixed by #20044
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@tsteur
Copy link
Member

tsteur commented Nov 23, 2022

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}

@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 Nov 23, 2022
@bx80
Copy link
Contributor

bx80 commented Nov 23, 2022

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.

@bx80 bx80 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 Nov 23, 2022
@bx80 bx80 added this to the 5.0.0 milestone Nov 23, 2022
@sgiehl sgiehl modified the milestones: 5.0.0, 4.13.3, 4.13.0 May 16, 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.

3 participants