monarc-project / MonarcAppFO

MONARC - Method for an Optimised aNAlysis of Risks by @NC3-LU
https://www.monarc.lu
GNU Affero General Public License v3.0
101 stars 39 forks source link

Could not change admin password #496

Closed dbarzin closed 1 year ago

dbarzin commented 1 year ago

This bug tracker is for tracking bugs, todos and confirmed new features. If you want to submit a feature request please discuss about it here: https://github.com/monarc-project/MonarcAppFO/discussions

Describe the bug Got an error the trying to change admin password

To Reproduce Steps to reproduce the behavior:

  1. Login with admin in Monarc
  2. Go to Account
  3. Enter previous password and new password.
  4. click "Update password"
  5. See error

Expected behavior Password changed with no error

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Questions Answers
Type of issue Bug
OS version (server) Ubuntu 22.04
OS version (client) Win10
PHP version 8.1
MONARC version / git hash 2.12.6
Browser Chromium

Additional context { "errors": [ { "message": "Laminas\View\Renderer\PhpRenderer::render: Unable to render template \"monarc/front-office/api-user-password/get\"; resolver could not resolve to a file", "error": "error-exception", "exception": { "class": "Laminas\View\Exception\RuntimeException", "file": "/var/lib/monarc/releases/MonarcAppFO-v2.12.6/vendor/laminas/laminas-view/src/Renderer/PhpRenderer.php", "line": 518, "message": "Laminas\View\Renderer\PhpRenderer::render: Unable to render template \"monarc/front-office/api-user-password/get\"; resolver could not resolve to a file", "stacktrace": "#0 /var/lib/monarc/releases/MonarcAppFO-v2.12.6/vendor/laminas/laminas-view/src/View.php(194): Laminas\View\Renderer\PhpRenderer->render()\n#1 /var/lib/monarc/releases/MonarcAppFO-v2.12.6/vendor/laminas/laminas-view/src/View.php(222): Laminas\View\View->render()\n#2 /var/lib/monarc/releases/MonarcAppFO-v2.12.6/vendor/laminas/laminas-view/src/View.php(187): Laminas\View\View->renderChildren()\n#3 /var/lib/monarc/releases/MonarcAppFO-v2.12.6/vendor/laminas/laminas-mvc/src/View/Http/DefaultRenderingStrategy.php(92): Laminas\View\View->render()\n#4 /var/lib/monarc/releases/MonarcAppFO-v2.12.6/vendor/laminas/laminas-eventmanager/src/EventManager.php(320): Laminas\Mvc\View\Http\DefaultRenderingStrategy->render()\n#5 /var/lib/monarc/releases/MonarcAppFO-v2.12.6/vendor/laminas/laminas-eventmanager/src/EventManager.php(170): Laminas\EventManager\EventManager->triggerListeners()\n#6 /var/lib/monarc/releases/MonarcAppFO-v2.12.6/vendor/laminas/laminas-mvc/src/Application.php(354): Laminas\EventManager\EventManager->triggerEvent()\n#7 /var/lib/monarc/releases/MonarcAppFO-v2.12.6/vendor/laminas/laminas-mvc/src/Application.php(335): Laminas\Mvc\Application->completeRequest()\n#8 /var/lib/monarc/releases/MonarcAppFO-v2.12.6/public/index.php(34): Laminas\Mvc\Application->run()\n#9 {main}" } } ] }

ruslanbaidan commented 1 year ago

Thank you for the report. It seems the error message that you receive is due to some rendering problems, but there is an issue with the password change due to a warning message. We have some legacy parts in the code that are going to be improved.

php v8.x comes with turned on warnings and notices, so could you try to tun them off in your php.ini file: error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT & ~E_NOTICE & ~E_WARNING and reload apache server.