[BUGFIX] Avoid circular reference of COR and ServerRequest
While the initial idea to store the current ContentObjectRender (cObj) instance in a request attribute, to pass it along to code that requires both, the request and a cObj, is solid, we missed that cObj itself does not require to hold the request as attribute. The patch changes this: The request attribute is only set for ContentObjects, as these are actually responsible for rendering and eventually evaluating a request or the cObj instance. This makes sure, that an instance of cObj is available for Extbase plugins as well as for Fluid view helpers, which can access the request via RenderingContext. By changing the concept slightly, all places that previously added the cObj to the request can be removed in favor of doing so only in AbstractContentObject and ContentObjectRenderer::callUserFunction. The latter is at least required for TypoScript using the old way of calling Extbase plugins with USER and it's userFunc property. The circular refere...
Showing
- typo3/sysext/extbase/Classes/Core/Bootstrap.php 1 addition, 2 deletionstypo3/sysext/extbase/Classes/Core/Bootstrap.php
- typo3/sysext/extbase/Classes/Mvc/Web/Routing/UriBuilder.php 1 addition, 1 deletiontypo3/sysext/extbase/Classes/Mvc/Web/Routing/UriBuilder.php
- typo3/sysext/fluid/Classes/ViewHelpers/CObjectViewHelper.php 7 additions, 2 deletionstypo3/sysext/fluid/Classes/ViewHelpers/CObjectViewHelper.php
- typo3/sysext/frontend/Classes/ContentObject/AbstractContentObject.php 5 additions, 0 deletions.../frontend/Classes/ContentObject/AbstractContentObject.php
- typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php 17 additions, 20 deletions.../frontend/Classes/ContentObject/ContentObjectRenderer.php
- typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php 1 addition, 1 deletion...ntend/Classes/Controller/TypoScriptFrontendController.php
- typo3/sysext/frontend/Classes/DataProcessing/FlexFormProcessor.php 1 addition, 1 deletion...ext/frontend/Classes/DataProcessing/FlexFormProcessor.php
- typo3/sysext/frontend/Tests/Unit/ContentObject/CaseContentObjectTest.php 1 addition, 1 deletion...ontend/Tests/Unit/ContentObject/CaseContentObjectTest.php
- typo3/sysext/frontend/Tests/Unit/ContentObject/ImageContentObjectTest.php 3 additions, 0 deletions...ntend/Tests/Unit/ContentObject/ImageContentObjectTest.php
- typo3/sysext/frontend/Tests/Unit/DataProcessing/FlexFormProcessorTest.php 0 additions, 4 deletions...ntend/Tests/Unit/DataProcessing/FlexFormProcessorTest.php
Please register or sign in to comment