Bug #101170
closedContentObjectRenderer instance is not always and not properly added as request attribute
100%
Description
Prerequisite¶
Given the following TypoScript:
page = PAGE
page.10 = EXTBASEPLUGIN
page.10 {
extensionName = MyExt
pluginName = MyPlugin
}
Given the default action referenced plugin is cached
Expectation¶
The request in the plugin (and the ConfigurationManager has the currentContentObject attribute set.
Actual behaviour¶
The currentContentObject is not set
Conceptual considerations¶
During frontend rendering, all rendering is initiated with an instance of ContentObjectRenderer.
Since most rendering code depends on the current request, the request has always to be passed to
the ContentObjectRenderer, which can then pass it to rendering code it calls.
At the same time some rendering code depends also depends on the data,
that initiated the rendering (aka, the data that is contained in ContentObjectRenderer objects).
I see two options of how to pass the request and the ContentObjectRenderer object (cObj) to the rendering code:
- Extend the API to make both accessible directly
- Wrap the initiating cObj (the cObj that initiates rendering) into the request it holds as attribute
I suggested the latter in #100623, but what we merged in the end is incomplete and therefore somewhat broken (see above)
I'm still wondering, if we should add the attribute to the request (at least in v12), directly in the request setter in ContentObjectRenderer.
Updated by Helmut Hummel over 1 year ago
- Related to Task #100623: Provide current content object as request attribute added
Updated by Gerrit Code Review over 1 year ago
- Status changed from New to Under Review
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79519
Updated by Gerrit Code Review over 1 year ago
Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79519
Updated by Gerrit Code Review over 1 year ago
Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79521
Updated by Helmut Hummel over 1 year ago
- Related to Bug #101201: Clean up ContenObjectRenderer usage added
Updated by Gerrit Code Review over 1 year ago
Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79519
Updated by Gerrit Code Review over 1 year ago
Patch set 4 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79519
Updated by Gerrit Code Review over 1 year ago
Patch set 5 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79519
Updated by Benni Mack over 1 year ago
- Related to Bug #100872: currentContentObject is not always available added
Updated by Gerrit Code Review over 1 year ago
Patch set 2 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79521
Updated by Gerrit Code Review over 1 year ago
Patch set 3 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79521
Updated by Gerrit Code Review over 1 year ago
Patch set 6 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79519
Updated by Gerrit Code Review over 1 year ago
Patch set 7 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79519
Updated by Gerrit Code Review over 1 year ago
Patch set 8 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79519
Updated by Gerrit Code Review over 1 year ago
Patch set 4 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79521
Updated by Gerrit Code Review over 1 year ago
Patch set 9 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79519
Updated by Gerrit Code Review over 1 year ago
Patch set 5 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79521
Updated by Helmut Hummel over 1 year ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 3c9ad409dd55fe8ff6a003f927b7399e992d1ee4.