typo3typo3-9.xtx-newstypo3-extensionstx-gridelements

Gridelements dataprocessing: Pass arguments to extension (ctype = list)


Using gridelements with dataprocessing works fine for all default content elements. But if I include one of my own extension, the arguments for the controller gets lost. So the content element renders, but with the default action (list) and the default templates.


To reproduce, I used the well-known news extension:

Static includes (template):

Grid rendering definition (part of "my_site_package"):

mySitePackage.gridelements.defaultGridSetup < lib.gridelements.defaultGridSetup
mySitePackage.gridelements.defaultGridSetup {
 templateName.field = tx_gridelements_backend_layout
  templateName.ifEmpty = default
  layoutRootPaths {
    10 = EXT:gridelements/Resources/Private/Layouts/
    20 = EXT:my_site_package/Resources/Private/Layouts/Gridelements/
  }
  partialRootPaths {
    10 = EXT:gridelements/Resources/Private/Partials/
    20 = EXT:my_site_package/Resources/Private/Partials/Gridelements/
  }
  templateRootPaths {
    10 = EXT:gridelements/Resources/Private/Templates/
    20 = EXT:my_site_package/Resources/Private/Templates/Gridelements/
  }
  dataProcessing {
    10 = GridElementsTeam\Gridelements\DataProcessing\GridChildrenProcessor
    10 {
        default {
            as = children
        }
    }
   }
  }

Fluid rendering (part of "my_site_package"):

<f:for each="{children}" as="row" key="rowNumber">
  <f:for each="{row}" as="column" key="columnNumber">
    <f:for each="{column}" as="child">
        <f:cObject typoscriptObjectPath="tt_content.{child.data.CType}" data="{child.data}" table="tt_content" />
    </f:for>
  </f:for>
</f:for>

Plugin integration (backend):

Result in frontend, if NOT placed in a gridelement:

Result in frontend, if placed in a gridelement:

Do I miss something here or is this a bug?


Solution

  • Just looked at the issue again and the solution might actually be something else:

    You should disable resolveFlexformData in your Gridelements configuration, to avoid XML data being processed while rendering grid children.

    https://gitlab.com/coderscare/gridelements/issues/14