@tsteur opened this Issue on November 23rd 2022 Member

Got below fatal error:

Error: {"message":"abs(): Argument #1 ($num) must be of type int|float, string given","file":"plugins\/Insights\/Model.php","line":62,"request_id":"2b3e0","backtrace":" on plugins\/Insights\/Model.php(62)\n#0 plugins\/Insights\/Model.php(62): abs('"><i...')\n#1 plugins\/Insights\/API.php(273): Piwik\Plugins\Insights\Model->getLastDate('today', 'day', '"><i...')\n#2 [internal function]: Piwik\Plugins\Insights\API->getInsights('1', 'day', 'today', 'Referrers_getSe...', false, '13', '12', '', '0.1', '1', '"><i...', 'absolute')\n#3 core\/API\/Proxy.php(244): call_user_func_array(Array, Array)\n#4 core\/Context.php(28): Piwik\API\Proxy->Piwik\API\{closure}()\n#5 core\/API\/Proxy.php(335): Piwik\Context::executeWithQueryParameters(Array, Object(Closure))\n#6 core\/Plugin\/Visualization.php(341): Piwik\API\Proxy->call('\\Piwik\\Plugins\\...', 'getInsights', Array)\n#7 core\/Plugin\/Visualization.php(188): Piwik\Plugin\Visualization->loadDataTableFromAPI()\n#8 core\/Plugin\/Report.php(320): Piwik\Plugin\Visualization->render()\n#9 plugins\/CoreHome\/Controller.php(60): Piwik\Plugin\Report->render()\n#10 [internal function]: Piwik\Plugins\CoreHome\Controller->renderReportWidget(Object(Piwik\Plugins\Referrers\Reports\GetSearchEngines))\n#11 core\/FrontController.php(631): call_user_func_array(Array, Array)\n#12 core\/FrontController.php(169): Piwik\FrontController->doDispatch('Referrers', 'getSearchEngine...', Array)\n#13 core\/dispatch.php(32): Piwik\FrontController->dispatch()\n#14 index.php(25): require_once('c...')\n#15 {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(TypeError))\n#6 \/core\/dispatch.php(32): Piwik\FrontController->dispatch()\n#7 \/index.php(25): require_once('\/c...')\n#8 {main}"}

URL: index.php?date=today&module=Referrers&format=html&action=getSearchEngines&idSite=1&period=day&segment=&widget=&showtitle=1&random=3319

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

GET: {"date":"today","module":"Referrers","format":"html","action":"getSearchEngines","idSite":"1","period":"day","segment":"","widget":"","showtitle":"1","random":"3319"}

@bx80 commented on November 23rd 2022 Contributor

From the backtrace it appears that the getInsights() API method was called with the value ><i... passed for the $comparedToXPeriods parameter. Could be a UI bug somewhere with an HTML fragment being passed by a broken link?

Powered by GitHub Issue Mirror