Expand my Community achievements bar.

SOLVED

Unable to publish Email fragment

Avatar

Level 5

We're attempting to pass a complex array of objects. Everything works fine in the preview, and we're able to send proofs successfully.

 

The object is defined at the content template level and utilized in a fragment to render the object details, which also works perfectly.

 

However, we're encountering an issue when trying to publish the email fragment. The error message indicates that the fragment is malformed.

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Level 5

@DavidKangni This fragment is coming out of a complex loop from the content template, which is looped inside a lookup data from a dataset (which is not supported yet in fragments), which we can't access inside a fragment.

 

We are working with Adobe on this. Complex objects are not yet supported for access over fragments from content templates. Lookups in the horizon to be made available in future releases to support in fragments.

View solution in original post

6 Replies

Avatar

Community Advisor

Hi @KotiSyamala , are you using any contextual attribute in the fragment as it is not supported.

Here is a similar example of what we are trying: products is an array of objects

defined in email template: 

{% let products = profile.productsInCart %} 

 

utilized in fragment : 

 

    {{#each products as |p|}}
            {{p.price}}
    {{/each}}

 

Avatar

Community Advisor

@KotiSyamala 

 

Instead of defining the array in the email template, declare it in the fragment

 

{{#each profile.productsInCart as |p|}}
{{p.price}}
{{/each}}

 

Thanks,

David



David Kangni

Avatar

Administrator

Hi @KotiSyamala,

Were you able to resolve this query with the help of the provided solutions, or do you still need further assistance? Please let us know. If any of the answers were helpful in moving you closer to a resolution, even partially, we encourage you to mark the one that helped the most as the 'Correct Reply.'
Thank you!



Sukrity Wadhwa

Avatar

Correct answer by
Level 5

@DavidKangni This fragment is coming out of a complex loop from the content template, which is looped inside a lookup data from a dataset (which is not supported yet in fragments), which we can't access inside a fragment.

 

We are working with Adobe on this. Complex objects are not yet supported for access over fragments from content templates. Lookups in the horizon to be made available in future releases to support in fragments.

Avatar

Administrator

Thanks @KotiSyamala for sharing the update!



Sukrity Wadhwa