Bug #21202
closed
No redirection after login by systemextension felogin
Added by Wim no-lastname-given over 14 years ago.
Updated about 14 years ago.
Description
In content element I defined as redirect mode "defined by User Record". And I filled in a redirection page in the userrecord.
After succesfull login there is no redirection; the login page is displayed.
Reason: In class tx_felogin_pi1.php lines 491 to 495 are added compared to Typo3 4.2.1.
Lines:
if ($this->redirectUrl) {
// use redirectUrl for action tag because of possible access restricted pages
$markerArray['###ACTION_URI###'] = htmlspecialchars($this->redirectUrl);
$this->redirectUrl = '';
}
The redirecturl is set to blank and is later on used.
(issue imported from #M12144)
Files
Is this related to: 0010327?
I think it is not related.
To my experience the redirection of a user or usergroup doesn't work.
The issue you mentioned, says "Redirect by usergroup works fine".
And further I see no relation to PHP Referer var.
The issue remains even with 4.3.0RC2
Sites using redirect (after login/logout) are in trouble, when upgrading to 4.3
It's not a showstopper, but important enough to raise the priority and fix the issue.
Thanks
I can confirm that behaviour.
I my opinion the problem is that the redirect part of the code comes below the "what to display" part.
If we want to redirect, we should not need to create some display code first.
Suggested solution: move redirect part to be executed before "what to display" part. Then login redirect and logout redirects are working fine in my scenarions.
Patch attached.
I've tested the patched version in 4.3.0 with redirect after login according to
- user login
- group login
- standard login (flexform)
Yep, it works as expected
And the "Thank you" goes to Franz
I've tested the patch and it works for me.
Thank you Franz!
FYI: i submited the patch to the core list. Thank you Franz.
The attached patch no longer applies to 4.3.1 because of whitespace changes. I have attached an updated patch (t3bug-12144.patch_4.3.1).
Argh, I should actually test my patches :-/
With my patch, the redirect works only at logout(!), but not at login :-(
There were several changes to class.tx_felogin_pi1.php since 4.3.0 and I can't see an obvious solution how to fix this issue. Back to the experts...
See possible solution in bug id 0012990
Also available in: Atom
PDF