Project

General

Profile

Actions

Bug #93386

closed

SessionNotCreatedException when using storeSessionData() and user not authenticated

Added by Laurent Foulloy almost 4 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2021-01-29
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
11
PHP Version:
7.4
Tags:
Complexity:
Is Regression:
Sprint Focus:

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 issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #93421: Reconstitution of frontend sessions not possible in case of multiple session persistence procedures within one requestClosed2021-02-03

Actions
Has duplicate TYPO3 Core - Bug #93974: Failure creating frontend session identifier multiple timesClosed2021-04-23

Actions
Actions #1

Updated by Laurent Foulloy over 3 years ago

  • Related to Bug #93421: Reconstitution of frontend sessions not possible in case of multiple session persistence procedures within one request added
Actions #2

Updated by Markus Klein over 3 years ago

Where are you calling storeSessionData()? From Extbase action?

Please describe steps to reproduce the problem. Thank you.

Actions #3

Updated by Laurent Foulloy over 3 years ago

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.

Actions #4

Updated by Gerrit Code Review over 3 years ago

  • Status changed from New to Under Review

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/67637

Actions #5

Updated by Gerrit Code Review over 3 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/67637

Actions #6

Updated by Gerrit Code Review over 3 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/67637

Actions #7

Updated by Gerrit Code Review over 3 years ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/67637

Actions #8

Updated by Gerrit Code Review over 3 years ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/67637

Actions #9

Updated by Gerrit Code Review over 3 years ago

Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/67637

Actions #10

Updated by Gerrit Code Review over 3 years ago

Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/67637

Actions #11

Updated by Oliver Hader over 3 years ago

  • Has duplicate Bug #93974: Failure creating frontend session identifier multiple times added
Actions #12

Updated by Gerrit Code Review over 3 years ago

Patch set 10 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/67637

Actions #13

Updated by Gerrit Code Review over 3 years ago

Patch set 11 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/67637

Actions #14

Updated by Markus Klein over 3 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #15

Updated by Benni Mack about 3 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF