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

Fix Referrers.getKeywordsFromSearchEngineId API for invalid subtable ids #19817

Closed
tsteur opened this issue Oct 5, 2022 · 1 comment · Fixed by #19823
Closed

Fix Referrers.getKeywordsFromSearchEngineId API for invalid subtable ids #19817

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

Comments

@tsteur
Copy link
Member

tsteur commented Oct 5, 2022

URL to reproduce: https://demo.matomo.cloud/?date=2010-04-22&filter_limit=25&format=JSON&idSite=1&idSubtable=34&method=Referers.getKeywordsFromSearchEngineId&module=API&period=month&token_auth=anonymous

GET: {"date":"2010-04-22","filter_limit":"25","format":"JSON","idSite":"1","idSubtable":"34","method":"Referers.getKeywordsFromSearchEngineId","module":"API","period":"month","token_auth":"anonymous"}

See stack trace

Error: {"message":"Call to a member function getColumn() on bool","file":"plugins/Referrers/API.php","line":332,"request_id":"a01d2","backtrace":" on plugins/Referrers/API.php(332)\n#0 [internal function]: Piwik\Plugins\Referrers\API->getKeywordsFromSearchEngineId('1', 'month', '2010-04-22', '34', false)\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(266): Piwik\API\Proxy->call('\\Piwik\\Plugins\\...', 'getKeywordsFrom...', 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}"}

@tsteur tsteur added the Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. label Oct 5, 2022
@sgiehl
Copy link
Member

sgiehl commented Oct 6, 2022

Seems that occurs when a subtable is requested that doesn't exist. Will provide a simple fix for that.

@sgiehl sgiehl self-assigned this Oct 6, 2022
@sgiehl sgiehl added this to the 4.12.1 milestone Oct 6, 2022
@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. labels Oct 6, 2022
@justinvelluppillai justinvelluppillai changed the title Call to a member function getColumn() in Referrers/API.php Fix Referrers.getKeywordsFromSearchEngineId API for invalid subtable ids Oct 18, 2022
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