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

Fix Uncache viewhelper outside of extbase #1898

Closed

Conversation

Ceremony64
Copy link
Contributor

Fixes #1894 and a Typo3 v10 regression that came with the release of 7.0.0

Fixes a regression from v7.0.0 update:
Accessing some ViewHelpers (e.g. f:translate) within an uncache template would otherwise cause an exception
In case there is no Extbase ControllerContext, do not convert ServerRequest to Extbase Request. Instead, attach the ServerRequest directly to the RenderingContext
@linawolf
Copy link

linawolf commented Jun 11, 2024

Fixes errors in our TYPO3 v12 projec. @NamelessCoder It would be great if this could be merged

@NamelessCoder
Copy link
Member

Thanks for the pull request! However, as you can see from the PHPStan reported problems, changing the request resolving method reveals several other ViewHelpers which would not be compatible with a returned ServerRequest.

So I rolled all of that into a combined fix which fixes this particular error plus all potential errors coming from use outside of an Extbase context.

See 28768f3.

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.

BUG: Exceptions when using UncacheViewHelper on TYPO3 12
3 participants