femanager
femanager copied to clipboard
No flashmessage after user confirmation
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.
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.
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?
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.
is changed for V 6 Release
needs to be reverted, as this has side effects for persistence. SendPost and StoreInDB services do not work anymore.
Issue still present. Sometimes the flashmessage appears, but most of the time not.
February 2024, femanager v. 7.2.3, TYPO3 11.x - bug still exists... In my case (user confirmation required, FlashMessage createRequestWaitingForUserConfirm) changing the line https://github.com/in2code-de/femanager/blob/19191f5cee4084683fd9bcdb10e861242f5cab8a/Classes/Controller/NewController.php#L333 to $this->forward('createStatus'); fixed FlashMessage issue after profile creation.