Task #104502
Updated by André Buchmann 4 months ago
Comming from the surfcamp, I've tried to setup my content rendering without fluid_styled_content (not installed in project). And therefore came up with the following typoscript configuration using RecordTransformationProcessor to fetch the content elements: <pre> # Default configuration for content elements which are using FLUIDTEMPLATE directly lib.contentElement > lib.contentElement = FLUIDTEMPLATE lib.contentElement { templateName = Default templateRootPaths { 0 = EXT:site-distribution/Resources/Private/Templates/Content/ 10 = {$content.templates.templateRootPath} } partialRootPaths { 0 = EXT:site-distribution/Resources/Private/Templates/Content/Partials/ 10 = {$content.templates.partialRootPath} } layoutRootPaths { 0 = EXT:site-distribution/Resources/Private/Templates/Content/Layouts/ 10 = {$content.templates.layoutRootPath} } dataProcessing { 5 = record-transformation 5 { table = tt_content as = data } } } </pre> With this configuration "data" is now of type TYPO3\CMS\Core\Domain\Record instead array (compared to the fluid_styled_content way): !clipboard-202407301429-7d9rl.png! This results in forms not being rendered as the pi_flexform values are not recogniced in the f:cObject. (See second debug which is from "Render.html" of the Forms extension). <pre><code class="html"> <f:cObject typoscriptObjectPath="tt_content.{data.CType}.20" data="{data}" table="tt_content" /> </code></pre> For Objects the f:cObject Viewhelper calls ObjectAccess::getGettableProperties() which doesn't resolve the pi_flexform field: <pre><code class="php"> if (is_object($data)) { $data = ObjectAccess::getGettableProperties($data); } elseif (is_string($data) || is_numeric($data)) { $currentValue = (string)$data; $data = [$data]; } </code></pre> https://github.com/TYPO3/typo3/blob/ca8f1f9f9240e80a222e99b7b404226f4caddf90/typo3/sysext/fluid/Classes/ViewHelpers/CObjectViewHelper.php#L132-L133 !clipboard-202407301441-ulfbn.png! Possible solutions: 1. Convert Record to array for f:cObject call 2. Check for type RecordInterface Record or RawRecord and use ->toArray() in f:cObject Viewhelper 3. ...