@tsteur opened this Issue on January 19th 2022 Member

Looks to me like a regression. Looks like someone tried to grant a specific capability and it failed? If not a regression we can move it to 4.8

Error: {"message":"The arguments array must contain 2 items, 1 given","file":"\/core\/Translation\/Translator.php","line":100,"request_id":"fd634","backtrace":" on \/core\/Translation\/Translator.php(100)\n#0 \/core\/Translation\/Translator.php(100): vsprintf('Le param\xC3\xA8tre \xC2...', Array)\n#1 \/core\/Piwik.php(890): Piwik\Translation\Translator->translate('Le param\xC3\xA8tre \xC2...', Array, 'fr')\n#2 \/core\/Access\/RolesProvider.php(62): Piwik\Piwik::translate('UsersManager_Ex...', 'view, write, ad...')\n#3 \/plugins\/UsersManager\/API.php(1148): Piwik\Access\RolesProvider->checkValidRole('tagmanager_writ...')\n#4 [internal function]: Piwik\Plugins\UsersManager\API->setUserAccess('login...', 'tagmanager_writ...', Array)\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\\...', 'setUserAccess', Array)\n#9 \/plugins\/API\/Controller.php(46): Piwik\API\Request->process()\n#10 [internal function]: Piwik\Plugins\API\Controller->index()\n#11 \/core\/FrontController.php(619): call_user_func_array(Array, Array)\n#12 \/core\/FrontController.php(168): Piwik\FrontController->doDispatch('API', false, 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(619): call_user_func_array(Array, Array)\n#2 \/core\/FrontController.php(168): Piwik\FrontController->doDispatch('Cloud', 'safemode', Array)\n#3 \/core\/FrontController.php(99): Piwik\FrontController->dispatch('CorePluginsAdmi...', 'safemode', Array)\n#4 \/core\/FrontController.php(139): Piwik\FrontController::(Array)\n#5 \/core\/FrontController.php(189): Piwik\FrontController::(Object(ValueError))\n#6 \/core\/dispatch.php(32): Piwik\FrontController->dispatch()\n#7 \/index.php(25): require_once('\/c...')\n#8 {main}"}

URL: /index.php?method=UsersManager.setUserAccess&module=API&format=JSON&idSite=7&period=day&date=yesterday

Referrer: /index.php?module=UsersManager&action=index&idSite=7&period=day&date=yesterday

GET: {"method":"UsersManager.setUserAccess","module":"API","format":"JSON","idSite":"7","period":"day","date":"yesterday","filter_limit":100}

POST: {"userLogin":"xyz","access":"tagmanager_write","idSites":["5"],"token_auth":"XYZANONYMIZED","force_api_session":"1"}

@justinvelluppillai commented on January 19th 2022 Member

I think maybe not a regression, but an existing bug in this translation with incorrect number of params https://github.com/matomo-org/matomo/blob/4.x-dev/core/Access/RolesProvider.php#L62 (can't see anything changing here recently)

@tsteur commented on January 19th 2022 Member

👍 will move it out

This Issue was closed on January 19th 2022
Powered by GitHub Issue Mirror