Bug #105039
Updated by Lars Tode about 1 month ago
The method @\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::mergeTSRef@ generates TypoScript which is used for Content-Elements. The TypoScript what is visible within the backend module differs from this generated TypoScript. The reason is, that the processing of the TypoScript within @mergeTSRef()@ works differently and does _not_ remove settings as expected. This has an effect in case the fluid viewhelper to render cObjects is used. **To Reproduce** # Add an additional DataProcessor to @lib.contentElement@ <pre> lib.contentElement { dataProcessing { 42 = Acme\Example\DataProcessing\ExampleDataProcessor } } </pre> # Create a new content element and reset the dataProcessing<pre> tt_content.tx_acme_ce =< lib.contentElement tt_content.tx_acme_ce { templateName = Example dataProcessing > dataProcessing { 84 = Acme\Example\DataProcessing\Example2DataProcessor } } </pre> # Render the cObject using the ViewHelper <pre><f:cObject typoscriptObjectPath="tt_content.tx_acme_ce " data="{item}" /></pre> As a result, the DataProcessor on position 42 was not removed. +Generated TypoScript by @mergeTSRef()@:+ <pre> tt_content.tx_acme_ce { templateName = Example dataProcessing { 42 = Acme\Example\DataProcessing\ExampleDataProcessor 84 = Acme\Example\DataProcessing\Example2DataProcessor } } </pre> *Expected behaviour* The expected result is that the calculated TypoScript is identical to the TypoScript shown in the backend. TypoScript that is removed should not be available. <pre> tt_content.tx_acme_ce { templateName = Example dataProcessing { 84 = Acme\Example\DataProcessing\Example2DataProcessor } } </pre> The DataProcessor on position 42 should not be available nor executed on the content element.