magento-lts
magento-lts copied to clipboard
Admin Login succeeds but shows error "invalid form key"
Preconditions (*)
- OM 20.1.0 and still in OM 20.2.0
- PHP 8.1
- backend renamed from the default to, e.g. "workspace"
- Using "sales" as entrypoint instead of the dashbaord (or whatever is the default)
- Using the openmage admin theme
Steps to reproduce (*)
- Go to the admin
- Login
Expected result (*)
- Login completes without any error messages
Actual result (*)
- Login is successful (meaning the backend is showing up and one can work as expected)
- Error message "invalid formkey" (twice) comes up directly after login
The log is empty, I put some output via var_export() to the log for the login process:
2023-11-19T13:54:34+00:00 ERR (3): Mage_Core_Controller_Varien_Action::_validateFormKey: formkey: EHKCL7TOyhs9v0YL, expected: oPjQzFNAKvcLQQ1Z
2023-11-19T13:54:34+00:00 ERR (3): Mage_Core_Controller_Varien_Action::_validateFormKey: request: Mage_Core_Controller_Request_Http::__set_state(array(
'_dispatched' => false,
'_module' => 'workspace',
'_moduleKey' => 'module',
'_controller' => 'index',
'_controllerKey' => 'controller',
'_action' => 'login',
'_actionKey' => 'action',
'_params' =>
array (
'key' => '814c5d9d7336582336dabb49b79f1193',
'messageSent' => true,
'forwarded' => true,
),
'_paramSources' =>
array (
0 => '_GET',
1 => '_POST',
),
'_requestUri' => '/index.php/workspace/index/index/key/814c5d9d7336582336dabb49b79f1193/',
'_baseUrl' => '/index.php',
'_basePath' => '',
'_pathInfo' => '/workspace/index/index/key/814c5d9d7336582336dabb49b79f1193/',
'_rawBody' => NULL,
'_aliases' =>
array (
),
'_originalPathInfo' => '/workspace/index/index/key/814c5d9d7336582336dabb49b79f1193/',
'_storeCode' => NULL,
'_requestString' => '/workspace/index/index/key/814c5d9d7336582336dabb49b79f1193/',
'_rewritedPathInfo' => NULL,
'_requestedRouteName' => NULL,
'_routingInfo' =>
array (
),
'_route' => 'adminhtml',
'_directFrontNames' =>
array (
'api' => '',
),
'_controllerModule' => 'Mage_Adminhtml',
'_isStraight' => false,
'_beforeForwardInfo' =>
array (
),
'_internallyForwarded' => true,
))
2023-11-19T13:54:34+00:00 ERR (3): Mage_Core_Controller_Varien_Action::_validateFormKey: formkey: EHKCL7TOyhs9v0YL, expected: oPjQzFNAKvcLQQ1Z
2023-11-19T13:54:34+00:00 ERR (3): Mage_Core_Controller_Varien_Action::_validateFormKey: request: Mage_Core_Controller_Request_Http::__set_state(array(
'_dispatched' => true,
'_module' => 'workspace',
'_moduleKey' => 'module',
'_controller' => 'index',
'_controllerKey' => 'controller',
'_action' => 'login',
'_actionKey' => 'action',
'_params' =>
array (
'key' => '814c5d9d7336582336dabb49b79f1193',
'messageSent' => true,
'forwarded' => true,
),
'_paramSources' =>
array (
0 => '_GET',
1 => '_POST',
),
'_requestUri' => '/index.php/workspace/index/index/key/814c5d9d7336582336dabb49b79f1193/',
'_baseUrl' => '/index.php',
'_basePath' => '',
'_pathInfo' => '/workspace/index/index/key/814c5d9d7336582336dabb49b79f1193/',
'_rawBody' => NULL,
'_aliases' =>
array (
),
'_originalPathInfo' => '/workspace/index/index/key/814c5d9d7336582336dabb49b79f1193/',
'_storeCode' => NULL,
'_requestString' => '/workspace/index/index/key/814c5d9d7336582336dabb49b79f1193/',
'_rewritedPathInfo' => NULL,
'_requestedRouteName' => NULL,
'_routingInfo' =>
array (
),
'_route' => 'adminhtml',
'_directFrontNames' =>
array (
'api' => '',
),
'_controllerModule' => 'Mage_Adminhtml',
'_isStraight' => false,
'_beforeForwardInfo' =>
array (
),
'_internallyForwarded' => true,
))
I got exactly the same problem. Login works but this error message shows up twice every time.
Same here :(