Project

General

Profile

Actions

Bug #25142

closed

Redirections do not work in TYPO3 4.5

Added by Alban Cousinie almost 14 years ago. Updated almost 10 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2011-02-23
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.5
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

It looks like felogin is not compatible with Typo3 4.5

When assigning a page redirection after login (and setting Redirect mode to 'after login' of course) the logged user won't be redirected to the specified page.
BUT if you disable the "Enable Redirect" checkbox at the bottom of the plugin flexform it will now redirect the user (which is the inverse of the expected behavior). Enabling the checkbox "Enable Redirect" again will disable the redirection.

Redirect after logout will raise a 404 error while the page given page does exist.

(issue imported from #M17720)


Files

class.tx_felogin_pi1_new.php (37.5 KB) class.tx_felogin_pi1_new.php Martin Mädler, 2011-04-13 14:45

Related issues 1 (0 open1 closed)

Has duplicate TYPO3 Core - Bug #27735: Felogin redirection does not work after loginRejected2011-06-28

Actions
Actions #1

Updated by Alban Cousinie almost 14 years ago

Also I have tried with both real URL enabled and disabled : same problem occur.

Note I am using a new and clean Typo3 4.5 installation.

See also issue 0017703 which is likely related.

Actions #2

Updated by over 13 years ago

This is a duplicate of #17466 caused by a misleading label. Deactivate the checkbox "Enable redirect" --> "Enabled" and it will work.

Actions #3

Updated by Rainer Becker over 13 years ago

A simple redirect to unprotected pages doesn’t work in my installation (TYPO3 4.5.2). Switching the TYPO3-Version back to 4.4.7 makes it work.

Configured by TS:
redirectMode=groupLogin,login,logout
redirectFirstMethod = 1
redirectPageLogin = 95
redirectPageLogout = 45
redirectPageError = 90

So there seems to go something different with the current TYPO3 Version.

Actions #4

Updated by Steffen Kamper over 13 years ago

it works correct. Please read the post in v4 list for details
http://lists.typo3.org/pipermail/typo3-project-v4/2011-March/001928.html

Actions #5

Updated by Rainer Becker over 13 years ago

I did some more testing and found that the TS

showLogoutFormAfterLogin = 1

broke all login redirects (not error and logout redirects); this doesn’t happen under TYPO3 4.4.7.
Hope this helps,
rainer

Actions #6

Updated by Sven Teuber over 13 years ago

confirmed. Removing the showLogoutFormAfterLogin checkbox in the flexform fixed a non working redirect in TYPO3 4.5.2 for me.

Thanks Rainer, that just made my day. :)

Actions #7

Updated by Steffen Kamper over 13 years ago

I confirm this and work on a fix.

Actions #8

Updated by Martin Mädler over 13 years ago

Redirection doesn't work for me properly. I'm using TYPO3 4.5.2 and felogin 1.3.1.
To reproduce this issue. Install the current TYPO3 package and set up a redirection in the Login module.

But I have a fix for this.
Simply switch the code segment starting on line 117

    // What to display
  $content='';
  if ($this->piVars['forgot']) {
    $content .= $this->showForgot();
  } elseif ($this->piVars['forgothash']) {
    $content .= $this->changePassword();
  } else {
    if($this->userIsLoggedIn && !$this->logintype) {
      $content .= $this->showLogout();
    } else {
      $content .= $this->showLogin();
    }
  }

with the code segment starting on line 131

  // Process the redirect
if (($this->logintype === 'login' || $this->logintype === 'logout') && $this->redirectUrl && !$this->noRedirect) {
  if (!$GLOBALS['TSFE']->fe_user->cookieId) {
    $content .= $this->cObj->stdWrap($this->pi_getLL('cookie_warning', '', 1), $this->conf['cookieWarning_stdWrap.']);
  } else {
    t3lib_utility_Http::redirect($this->redirectUrl);
  }
}

Under some circumstamces $this->redirectUrl gets assigned an empty string, so that the redirect can't be processed.

Redirection is a must have :)

<b>edit:</b> Enable Redirect->Enabled still must be unchecked however

Actions #9

Updated by Felix Nagel about 13 years ago

Would someone of the core team please fix this. This is one of the most needed features of TYPO3 and its broken for MONTH!

Related issue has a solution too!

Actions #10

Updated by Steffen Gebert about 13 years ago

  • Target version deleted (0)
  • TYPO3 Version set to 4.6

So maybe you just want to push it to Gerrit? See http://wiki.typo3.org/Git

Actions #11

Updated by Andreas Wolf about 13 years ago

  • TYPO3 Version changed from 4.6 to 4.5

@Martin: I don't see why your change should fix a broken redirect... $this->redirectUrl is not changed in any of the blocks, so if the URL really is empty at that point, this won't change.

@all review: I consider this closed - a fix for the wrong label has been committed with 67fc92d906290b5898a9504b457dea68a95ac2a6 in March already. Please check with the latest (!) 4.5 version again and report back if the problem persists. Also remember to update your translations if you don't use English, as the label was changed!

Actions #12

Updated by Andreas Wolf about 13 years ago

  • Status changed from Accepted to Needs Feedback
Actions #13

Updated by Andreas Wolf about 13 years ago

  • Subject changed from redirections do not work in Typo3 4.5 to Redirections do not work in TYPO3 4.5
Actions #14

Updated by Felix Nagel about 13 years ago

I have no clue what Lorenz meant by posting #17466 as it has nothing to do with a label. Although Im generally quite sure Im not talking about the deactivate redirect checkbox in pi1.

Ive tested in TYPO3 4.5.5 and 4.5.6 and can confirm both do not work as expected without the patch attached to the related issue #27735. Tested on different installations and servers.

I would push the related issue to Gerrit as we've using it for month without problems. Any link how to do this? Im new to the Gerrit process.

Actions #15

Updated by Chris topher about 13 years ago

Yes Felix, you find some information in the Wiki: http://wiki.typo3.org/Git_Gerrit

Actions #16

Updated by Xavier Perseguers almost 13 years ago

  • Assignee deleted (Steffen Kamper)
Actions #17

Updated by Sebastian Steinmetz about 12 years ago

an news on this? please see the related. if all it needs is a little push to gerrit, i can do this! let me know. :)

Actions #18

Updated by Alexander Opitz over 11 years ago

  • Status changed from Needs Feedback to New

A little push to Gerrit would be nice. :)

Actions #19

Updated by Jigal van Hemert almost 10 years ago

  • Status changed from New to Closed
  • Is Regression set to No

Open for a long time after requesting a patch. Setting to closed because there is no activity.

Actions

Also available in: Atom PDF