in2code-de / powermail

This is the official repository of the TYPO3 extension powermail! Powermail is a well-known, editor-friendly, powerful and easy mailform extension for TYPO3
https://in2code.de
86 stars 174 forks source link

Session data not stored if receiver mail was sent and redirect enabled #579

Open KreativeKrise opened 4 years ago

KreativeKrise commented 4 years ago

I want to store some form data into the user session with help of the saveSession function (https://github.com/einpraegsam/powermail/blob/develop/Documentation/ForAdministrators/BestPractice/SaveSession.md). After submit I redirect the user to another page. The form data are stored in the session, until an email to the receiver will be sent.

My typoscript configuration:

plugin.tx_powermail.settings.setup.saveSession {
  _method = temporary
  e_mail = TEXT
  e_mail.field = e_mail
}

It doesn't matter if I set the _method = temporary or _method = permanently.

Tested with powermail 8.1.2 and TYPO3 10.4.6.

cmbeckmann commented 3 years ago

I can confirm this problem with powermail 8.3.1 and Typo3 10.4.14.

I noticed that in a recent commit the call to storeSessionData() was removed in SessionUtility::setSessionValue(). Putting it back at the end of the function seems to solve the problem: ObjectUtility::getTyposcriptFrontendController()->fe_user->storeSessionData()

But I don't know if this has any unwanted side effects, or why the call was removed in the first place.