[BUGFIX] Load server request from rendering context#1964
Draft
cweiske wants to merge 1 commit intoFluidTYPO3:developmentfrom
Draft
[BUGFIX] Load server request from rendering context#1964cweiske wants to merge 1 commit intoFluidTYPO3:developmentfrom
cweiske wants to merge 1 commit intoFluidTYPO3:developmentfrom
Conversation
8cf7f84 to
7a1bd86
Compare
Since commit 9912916 > [BUGFIX] Always fetch ContentObject from request in TYPO3v12+ the current content element is not available anymore in view helpers unless passed manually ("v:content.resource.fal(record: record)"). This leads to e.g. "v:content.resources.fal" not loading images anymore. The current content object is part of the Request object. A new request object is created when a new content element is rendered. This is not $GLOBALS['TYPO3_REQUEST'] - the per-element request object gets passed to each view helper via the rendering context. The rendering context API changed with TYPO3 v13[1], making it necessary to first try the attribute (TYPO3 v13+) and fall back to getRequest() in TYPO3v12. [1] https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/13.3/Deprecation-104684-FluidRenderingContext-getRequest.html Resolves: FluidTYPO3#1937
7a1bd86 to
a4ae4ed
Compare
Contributor
Author
|
Getting the Tests run under TYPO3 v13 is a hard task... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since commit 9912916
the current content element is not available anymore in view helpers unless passed manually ("v:content.resource.fal(record: record)"). This leads to e.g. "v:content.resources.fal" not loading images anymore.
The current content object is part of the Request object. A new request object is created when a new content element is rendered. This is not $GLOBALS['TYPO3_REQUEST'] - the per-element request object gets passed to each view helper via the rendering context.
The rendering context API changed with TYPO3 v13[1], making it necessary to first try the attribute (TYPO3 v13+) and fall back to getRequest() in TYPO3v12.
[1] https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/13.3/Deprecation-104684-FluidRenderingContext-getRequest.html
Resolves: #1937
I've successfully tested it with image content elements that use
v:content.resource.falon TYPO3 v12.