femanager icon indicating copy to clipboard operation
femanager copied to clipboard

No flashmessage after user confirmation

Open mediaessenz opened this issue 5 years ago • 7 comments

I'm currently not sure if this is a bug in the new TYPO3 Version 8.7.21 or femanager.

Anyway, I have an installation with femanager who uses just the user confirmation to activate a profile.

Normally, after the user clicks on the confirmation link inside the generated mail, he should finally get redirected to the createStatusAction, which itself outputs a headline and a flashmessage "profile created".

Unfortunately there is no flashmessage anymore.

After digging into the code, I found the place where this message is added (AbstractController, Line 246):

$this->addFlashMessage(LocalizationUtility::translate('create'));

Right after this, there is a redirect to the action stored inside the $redirectByActionName variable. That's "createStatus" in my case. I have no clue why, but after the redirect to the "createStatusAction" of the New-Controller, the flashmessage set shortly before is gone. If I add a $this->addFlashMessage to the createStatusAction, I get a flashmessage in the frontend.

So it seems, flashmessages defined before a redirect get lost.

If I change the redirect $this->redirect($redirectByActionName); in the AbstractController to $this->forward($redirectByActionName);, the flashmessage reaches the frontend.

mediaessenz avatar Dec 12 '18 10:12 mediaessenz

I experience a similar issue but not with femanager. Perhaps this is related to TYPO3 than femanager or there are certain steps that lead to this unexpected behaviour.

I have an import script which adds flashMessage "A" and redirects to the upload page action in case of a failure. Otherwise it continues and the import is processed. At the end I add a success flashMessage "B" and redirect to the same action. FlashMessage "A" is not available in the redirected action even though it's added before the redirection. If I change the redirect to forward, it's working. However, if I add the flashMessage "A" regardless of a failure or success it's displayed in case of a success.

The stuff I do after the failure-check are to start a transaction etc. So, sql related stuff. After removing it, it did not work either.

nostadt avatar Jan 28 '19 13:01 nostadt

Same here. According to this tutorial, the user also should get logged in automatically, but there is no autologin: https://jweiland.net/video-anleitungen/typo3/interessante-typo3-extensions/femanager.html Also a bug?

klodeckl avatar Feb 04 '19 16:02 klodeckl

Hi guys, any progress on this? We encounter the same issue on TYPO3 8.7.24 and femanager 4.2.2. Switching from redirect() to forward() as @mediaessenz described solved the issue for us as well.

eliashaeussler avatar May 10 '19 13:05 eliashaeussler

is changed for V 6 Release

sbusemann avatar Jun 23 '20 14:06 sbusemann

needs to be reverted, as this has side effects for persistence. SendPost and StoreInDB services do not work anymore.

sbusemann avatar Jul 09 '20 06:07 sbusemann