Open tsteur opened 3 years ago
Argument 1 passed to Piwik\Category\CategoryList::addCategory() must be an instance of Piwik\Cache, instance of Piwik\Plugins\CoreHome\Categories\ActionsCategory given, called in /core/Category/CategoryList.php on line 70
That message doesn't make sense at all. The method is defined as:
public function addCategory(Category $category)
So not sure why it complains about not being an instance of Piwik\Cache
🤷
Had now a similar random error with a different class. It must be some PHP bug
Error: {"message":"Argument 3 passed to Piwik\\Segment::__construct() must be an instance of Piwik\\Period\\PeriodValidator or null, instance of Piwik\\Date given, called in /core\/Archive\/ArchiveQueryFactory.php on line 128","file":"/core\/Segment.php","line":124,"request_id":"af6e1","backtrace":" on /core\/Segment.php(124)\n#0 /core\/Archive\/ArchiveQueryFactory.php(128): Piwik\\Segment->__construct(false, Array, Object(Piwik\\Date), Object(Piwik\\Date))\n#1 /core\/Archive\/ArchiveQueryFactory.php(32): Piwik\\Archive\\ArchiveQueryFactory->getSegmentFromQueryParam(false, Array, Array)\n#2 /core\/Archive.php(213): Piwik\\Archive\\ArchiveQueryFactory->build('1', 'day', '2021-09-07,2021...', false, false)\n#3 /plugins\/Goals\/API.php(531): Piwik\\Archive::build('1', 'day', '2021-09-07,2021...', false)\n#4 [internal function]: Piwik\\Plugins\\Goals\\API->getMetrics('1', 'day', '2021-09-07,2021...', false, 'ecommerceOrder', 'avg_order_reven...', '1')\n#5 /core\/API\/Proxy.php(244): call_user_func_array(Array, Array)\n#6 /core\/Context.php(28): Piwik\\API\\Proxy->Piwik\\API\\{closure}()\n#7 /core\/API\/Proxy.php(335): Piwik\\Context::executeWithQueryParameters(Array, Object(Closure))\n#8 /core\/API\/Request.php(266): Piwik\\API\\Proxy->call('\\\\Piwik\\\\Plugins\\\\...', 'getMetrics', Array)\n#9 /core\/API\/Request.php(559): Piwik\\API\\Request->process()\n#10 /plugins\/Goals\/API.php(491): Piwik\\API\\Request::processRequest('Goals.getMetric...', Array, Array)\n#11 [internal function]: Piwik\\Plugins\\Goals\\API->get('1', 'day', '2021-09-07,2021...', false, 'ecommerceOrder', 'avg_order_reven...', '1', false)\n#12 /core\/API\/Proxy.php(244): call_user_func_array(Array, Array)\n#13 /core\/Context.php(28): Piwik\\API\\Proxy->Piwik\\API\\{closure}()\n#14 /core\/API\/Proxy.php(335): Piwik\\Context::executeWithQueryParameters(Array, Object(Closure))\n#15 /core\/API\/Request.php(266): Piwik\\API\\Proxy->call('\\\\Piwik\\\\Plugins\\\\...', 'get', Array)\n#16 /core\/ViewDataTable\/Request.php(43): Piwik\\API\\Request->process()\n#17 /core\/Plugin\/ViewDataTable.php(368): Piwik\\ViewDataTable\\Request->loadDataTableFromAPI(Array)\n#18
And a similar one
Error: {"message":"Call to undefined method Piwik\ProxyHttp::getName()","file":"vendor\/twig\/twig\/src\/ExtensionSet.php","line":397,"requestid":"5f6ef","backtrace":" on vendor\/twig\/twig\/src\/ExtensionSet.php(397)\n#0 vendor\/twig\/twig\/src\/ExtensionSet.php(386): Twig\ExtensionSet->initExtension(Object(Twig\Extension\CoreExtension))\n#1 vendor\/twig\/twig\/src\/ExtensionSet.php(360): Twig\ExtensionSet->initExtensions()\n#2 vendor\/twig\/twig\/src\/Environment.php(794): Twig\ExtensionSet->getUnaryOperators()\n#3 vendor\/twig\/twig\/src\/Lexer.php(457): Twig\Environment->getUnaryOperators()\n#4 vendor\/twig\/twig\/src\/Lexer.php(108): Twig\Lexer->getOperatorRegex()\n#5 vendor\/twig\/twig\/src\/Environment.php(457): Twig\Lexer->construct(Object(Twig\Environment))\n#6 vendor\/twig\/twig\/src\/Environment.php(507): Twig\Environment->tokenize(Object(Twig\Source))\n#7 vendor\/twig\/twig\/src\/Environment.php(348): Twig\Environment->compileSource(Object(Twig\Source))\n#8 vendor\/twig\/twig\/src\/Environment.php(309): Twig\Environment->loadTemplate('TwigTemplate...', '@CustomPlugin\/safemode...')\n#9 vendor\/twig\/twig\/src\/Environment.php(277): Twig\Environment->load('@CustomPlugin\/safemode...')\n#10 core\/View.php(318): Twig\Environment->render('@CustomPlugin\/safemode...', Array)\n#11 core\/View.php(303): Piwik\View->renderTwigTemplate()\n#12 plugins\/CustomPlugin\/Controller.php(316): Piwik\View->render()\n#13 [internal function]: Piwik\Plugins\CustomPlugin\Controller->safemode(Array)\n#14 core\/FrontController.php(616): call_user_func_array(Array, Array)\n#15 core\/FrontController.php(167): Piwik\FrontController->doDispatch('CustomPlugin', 'safemode', Array)\n#16 core\/FrontController.php(98): Piwik\FrontController->dispatch('CorePluginsAdmi...', 'safemode', Array)\n#17 core\/FrontController.php(138): Piwik\FrontController::generateSafeModeOutputFromError(Array)\n#18 core\/FrontController.php(188): Piwik\FrontController::generateSafeModeOutputFromException(Object(Error))\n#19 core\/FrontController.php(98): Piwik\FrontController->dispatch('CorePluginsAdmi...', 'safemode', Array)\n#20 core\/FrontController.php(138): Piwik\FrontController::generateSafeModeOutputFromError(Array)\n#21 core\/FrontController.php(188): Piwik\FrontController::generateSafeModeOutputFromException(Object(Error))\n#22 core\/Plugin\/Controller.php(975): Piwik\FrontController->dispatch('Login', false)\n#23 plugins\/CoreHome\/Controller.php(138): Piwik\Plugin\Controller->redirectToIndex('CoreHome', 'index', 0)\n#24 [internal function]: Piwik\Plugins\CoreHome\Controller->redirectToCoreHomeIndex()\n#25 core\/FrontController.php(616): call_user_func_array(Array, Array)\n#26 core\/FrontController.php(167): Piwik\FrontController->doDispatch('CoreHome', false, Array)\n#27 core\/dispatch.php(32): Piwik\FrontController->dispatch()\n#28 index.php(25): require_once('c...')\n#29 {main}","safemode_backtrace":"#0 [internal function]: Piwik\Plugins\CustomPlugin\Controller->safemode(Array)\n#1 \/core\/FrontController.php(616): call_user_func_array(Array, Array)\n#2 \/core\/FrontController.php(167): Piwik\FrontController->doDispatch('CustomPlugin', '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\/FrontController.php(98): Piwik\FrontController->dispatch('CorePluginsAdmi...', 'safemode', Array)\n#7 \/core\/FrontController.php(138): Piwik\FrontController::(Array)\n#8 \/core\/FrontController.php(188): Piwik\FrontController::(Object(Error))\n#9 \/core\/FrontController.php(98): Piwik\FrontController->dispatch('CorePluginsAdmi...', 'safemode', Array)\n#10 \/core\/FrontController.php(138): Piwik\FrontController::(Array)\n#11 \/core\/FrontController.php(188): Piwik\FrontController::(Object(Error))\n#12 \/core\/Plugin\/Controller.php(975): Piwik\FrontController->dispatch('Login', false)\n#13 \/plugins\/CoreHome\/Controller.php(138): Piwik\Plugin\Controller->redirectToIndex('CoreHome', 'index', 0)\n#14 [internal function]: Piwik\Plugins\CoreHome\Controller->redirectToCoreHomeIndex()\n#15 \/core\/FrontController.php(616): call_user_func_array(Array, Array)\n#16 \/core\/FrontController.php(167): Piwik\FrontController->doDispatch('CoreHome', false, Array)\n#17 \/core\/dispatch.php(32): Piwik\FrontController->dispatch()\n#18 \/index.php(25): require_once('\/c...')\n#19 {main}
it's trying to call ProxyHttp there
See below stack trace. Not sure how this would happen. Maybe some PHP bug. It's the latest PHP 7.4. I think I've seen this once before. I will comment when this happens again and put it for now into backlog so we won't work on it.