Bug #93386
closed
SessionNotCreatedException when using storeSessionData() and user not authenticated
Added by Laurent Foulloy almost 4 years ago.
Updated about 3 years ago.
Description
I get a TYPO3\CMS\Core\Session\Backend\Exception\SessionNotCreatedException when calling the method storeSessionData() with a non-authenticated user (duplicate PRIMARY key in the INSERT query into fe_sessions).
It works correctly when the user is authenticated.
Calling storeSessionData() when the user is or is not authenticated was working fine before TYPO3 11.0
Thanks in advance for any hint.
Files
- Related to Bug #93421: Reconstitution of frontend sessions not possible in case of multiple session persistence procedures within one request added
Where are you calling storeSessionData()
? From Extbase action?
Please describe steps to reproduce the problem. Thank you.
I have attached a small extension to identify the bug.
Th extension contains the following non-cachable action :
public function defaultAction()
{
$frontEndUser = $GLOBALS['TSFE']->fe_user;
$value = $frontEndUser->getKey('ses', 'Test');
$value = $value + 1;
$frontEndUser->setKey('ses', 'Test', $value);
$frontEndUser->storeSessionData();
$this->view->assign('value', $value);
}
- Install the extension and add its static template.
- Add the plugin into a page. The plugin should display an increasing value each time the page is reloaded. It is the case with TYPO3 10 but not with TYPO3 11.
- Add the same plugin a new time on the same page. With TYPO3 10 both extensions display the correct values. With TYPO3 11, I get a SessionNotCreatedException Exception.
I hope it will help to identify the problem.
- Status changed from New to Under Review
- Has duplicate Bug #93974: Failure creating frontend session identifier multiple times added
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Status changed from Resolved to Closed
Also available in: Atom
PDF