Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redirect error when using felogin #408

Conversation

dontWatchMeCode
Copy link

Short description

Hello, I am getting an error with sys_redirct URLs in staticfilecache/Classes/Middleware/FrontendUserMiddleware.php
$feUser->appendCookieToResponse tries to access $GLOBALS['TYPO3_REQUEST'], which is not set in this situation.

TYPO3 Exception Screenshot:

https://github.com/lochmueller/staticfilecache/assets/84477901/ea573bde-e84e-4d5f-babd-9e2af569479a

Related Issue

none

More Details

This PR sets the $GLOBALS['TYPO3_REQUEST'] variable to the current $request available in the middleware.
Both are typed as TYPO3\CMS\Core\Http\ServerRequest.

Best regards.

@dontWatchMeCode
Copy link
Author

Small change: $feUser->appendCookieToResponse(... accepts normalizedParams as an Argument.
Settings $GLOBALS['TYPO3_REQUEST'] is not needed. >>54d314c

@lochmueller
Copy link
Owner

Thanks for the fix. Merged in current main branch.

@lochmueller lochmueller merged commit 0075628 into lochmueller:master Mar 15, 2024
2 checks passed
@dontWatchMeCode
Copy link
Author

Thanks, much appreciated.

@dontWatchMeCode dontWatchMeCode deleted the fix-feuser-redirect-typo3_request branch April 4, 2024 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants