Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Mikkel Veyhe Jepsen 1 post 71 karma points
    Mar 06, 2024 @ 06:55
    Mikkel Veyhe Jepsen
    0

    Nested BlockGrid and BlockEditorConverter

    Hi.

    On an U12 project we've added a preview to our BlockGrids in the backoffice to give the editors an idea of how the frontend looks. Now that we've upgraded the solution to U13, some of this preview has broken. More particular, it seems to break when we have BlockGrid components inside a BlockGrid component. E.g. like an Accordion with a number of AccordionItems.

    We're using the BlockEditorConverter.ConvertToElement(BlockItemData data, PropertyCacheLevel referenceCacheLevel, bool preview)

    to make the json from the backoffice into a IPublishedElement, and it seems like it fails somewhere in that conversion. It returns the Accordion component just fine, with all the properties correct, except the BlockGrid of AccordionItems, which ends up NULL.

    If we change the inner BlockGrid to a BlockList it works, but it would require a bigger rewrite of some of our code, so would prefer not to, if anyone has suggestions for workarounds.

Please Sign in or register to post replies

Write your reply to:

Draft