Bug #63975

Felogin Redirect after login

Added by Job Rutgers almost 5 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
Start date:
2014-12-18
Due date:
% Done:

0%

TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

I think there is a bug in the felogin redirect after login for Typo3 6.2.9:

When I go to the login page and try to login, I can login but a logout form (in the address bar ?referer=%2Flid%2F&pageId=8) is showed.

In felogin-hidden:

<input type="hidden" value="login" name="logintype">
<input type="hidden" value="10" name="pid">
<input type="hidden" value="/login/?referer=%2Flid%2F&pageId=8" name="redirect_url">
<input type="hidden" value="0" name="tx_felogin_pi1[noredirect]">

When I fail to login the first time it works fine and I get a redirect to page 8

In now felogin-hidden:

<input type="hidden" value="login" name="logintype">
<input type="hidden" value="10" name="pid">
<input type="hidden" value="/lid/" name="redirect_url">
<input type="hidden" value="0" name="tx_felogin_pi1[noredirect]">
<input type="hidden" value="https://www.domain.nl/login/?referer=%2Flid%2F&pageId=8" name="referer">

I use the following setup also in the Page Content plugin options:

plugin.tx_felogin_pi1 {
  preserveGETvars = all
  showPermaLogin = 1
  storagePid = 10
  showLogoutFormAfterLogin = 0
  redirectPageLogin = 8
  redirectMode = getpost,referer,login,logout,loginError

  redirectFirstMethod = 1
  redirectPageLoginError = 53

It only works when I use login as first method, but then my ?redirect_url=%2Flid%2Fleden-beheer%2F doesn't work any more.

History

#1 Updated by Jigal van Hemert almost 5 years ago

  • Status changed from New to Needs Feedback

Hi,

Can you add some more information?

  • is any of the speaking URLs you mention (/login/, /lid/, /lid/leden-beheer/) the page with uid = 8?
  • what is the URL of the login page originally? Is it also a https page?
  • what is in the hidden fields of the login form originally?
  • the pageId=8 parameter is something you use in another extension or TypoScript code? It's certainly not a standard TYPO3 parameter.

#2 Updated by Antoine Bouet almost 5 years ago

If you want that redirectMode "referer" works fine, you need to patch the file /typo3/sysext/felogin/Classes/Controller/FrontendLoginController.php

row 662 :

if ($this->piVars['redirectReferrer'] !== 'off') {
    // Avoid forced logout, when trying to login immediately after a logout
    $redirect_url[] = preg_replace('/[&?]logintype=[a-z]+/', '', GeneralUtility::getIndpEnv('HTTP_REFERER'));
}

Hope this helps ;) (and hope that it will be present in next release ;) )

#3 Updated by Job Rutgers almost 5 years ago

Jigal van Hemert wrote:

Hi,

Can you add some more information?

  • is any of the speaking URLs you mention (/login/, /lid/, /lid/leden-beheer/) the page with uid = 8?
  • what is the URL of the login page originally? Is it also a https page?
  • what is in the hidden fields of the login form originally?
  • the pageId=8 parameter is something you use in another extension or TypoScript code? It's certainly not a standard TYPO3 parameter.
  • the urls have the following ids: /login/ id=53, /lid/ id= 8, /lid/leden-beheer/ id=65
  • all the URL's are https
  • The originally login form have the following hidden fields
    <input type="hidden" value="login" name="logintype">
    <input type="hidden" value="10" name="pid">
    <input type="hidden" value="/login/?referer=%2Flid%2F" name="redirect_url">
    <input type="hidden" value="0" name="tx_felogin_pi1[noredirect]">
    

    *pageId=8 is something I don't use, just something I did copy from somewhere on the internet. But removing it make no difference.

#4 Updated by Job Rutgers almost 5 years ago

Antoine Bouet wrote:

If you want that redirectMode "referer" works fine, you need to patch the file /typo3/sysext/felogin/Classes/Controller/FrontendLoginController.php

row 662 :
[...]

Hope this helps ;) (and hope that it will be present in next release ;) )

It doesn't help, it works when I direct go to https://www.domain.nl/login/?referer=%2Flid%2F and Login then my hidden fields are:

<input type="hidden" value="login" name="logintype">
<input type="hidden" value="10" name="pid">
<input type="hidden" value="/login/?referer=%2Flid%2F" name="redirect_url">
<input type="hidden" value="0" name="tx_felogin_pi1[noredirect]">
<input type="hidden" value="/lid/" name="referer">

But when I just go to https://www.domain.nl/login/ and login I go to a status page with logout button and url https://www.domain.nl/login/?referer=%2Flid%2F&pageId=8
and hidden fields:

<input type="hidden" value="logout" name="logintype">
<input type="hidden" value="10" name="pid">
<input type="hidden" value="0" name="tx_felogin_pi1[noredirect]">

So he ignores my setting for After Successful Login Redirect to Page id=8 (/Lid/), if getpost or referer selected first,
there should be a <input type="hidden" value="/lid/" name="redirect_url"> on first load of https://www.domain.nl/login/

#5 Updated by Job Rutgers over 4 years ago

Bug is gone in Typo3 6.2.10

#6 Updated by Frederic Gaus over 4 years ago

  • Status changed from Needs Feedback to Resolved

#7 Updated by Benni Mack about 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF