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

The arguments array must contain 2 items in translator.php #18652

Closed
tsteur opened this issue Jan 19, 2022 · 2 comments · Fixed by #18655
Closed

The arguments array must contain 2 items in translator.php #18652

tsteur opened this issue Jan 19, 2022 · 2 comments · Fixed by #18655
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc. Regression Indicates a feature used to work in a certain way but it no longer does even though it should.
Milestone

Comments

@tsteur
Copy link
Member

tsteur commented Jan 19, 2022

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"}

@tsteur tsteur added Regression Indicates a feature used to work in a certain way but it no longer does even though it should. Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. labels Jan 19, 2022
@tsteur tsteur added this to the 4.7.0 milestone Jan 19, 2022
@justinvelluppillai
Copy link
Contributor

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
Copy link
Member Author

tsteur commented Jan 19, 2022

👍 will move it out

@tsteur tsteur modified the milestones: 4.7.0, 4.8.0 Jan 19, 2022
@tsteur tsteur 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 Jan 19, 2022
@sgiehl sgiehl self-assigned this Jan 19, 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. Regression Indicates a feature used to work in a certain way but it no longer does even though it should.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants