I am trying to implement a Content Fragment in Edge Delivery Services (EDS) using the Universal Editor. I have created a Content Fragment with the following definition and model JSON:
{
"definitions": [
{
"title": "Content Fragments",
"id": "aem-content-fragment",
"plugins": {
"xwalk": {
"cf": {
"name": "Sample CF",
"cfModel": "EDS Xwalk Model",
"cfFolder": "samplecf",
"title": "Sample",
"description": "sample description",
"template": {
"name": "Content Fragment",
"model": "aem-content-fragment"
}
}
}
}
}
],
"models": [
{
"id": "aem-content-fragment",
"fields": [
{
"component": "aem-content-fragment",
"name": "picker",
"label": "Content Fragment Picker",
"valueType": "string",
"variationName": "contentFragmentVariation",
"validation": {
"rootPath": "/content/dam/eds-xwalk/content-fragment"
}
}
]
}
],
"filters": []
}
I am getting the following output:
However, I expect the output to be similar to what we get in AEM’s Content Fragment, where we can see the structured fields and variations properly rendered
Questions:
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hi @VijayRa10 ,
Possible Issues & Fixes:
1. CF Model and Folder Configuration:
Your JSON model references
"cfModel": "EDS Xwalk Model",
"cfFolder": "samplecf"
However, in the validation rootPath, you are pointing to:
"rootPath": "/content/dam/eds-xwalk/content-fragment"
Fix: Ensure that cfFolder matches the folder where your content fragments are stored.
If your actual CF is inside /content/dam/eds-xwalk/content-fragment/, update:
"cfFolder": "content-fragment"
If it’s inside samplecf, update the rootPath instead.
2. Content Fragment Model Association
Your model is defined as:
"model": "aem-content-fragment"
If EDS does not recognize this model correctly, ensure:
- The CF model is correctly published in AEM.
- It is properly referenced in EDS (i.e., check in AEMaaCS if the CF model is deployed correctly).
3. Variation Handling
Your JSON model defines a variation:
"variationName": "contentFragmentVariation"
Fix: Ensure that:
- The variation name exactly matches the one in your CF model.
- If no variation exists, try removing "variationName": "contentFragmentVariation".
4. Universal Editor Rendering Issue If structured fields are missing:
Try manually previewing the CF API JSON from /content/dam/eds-xwalk/content-fragment/cf-testing using:
<AEM_URL>/api/assets/content/dam/eds-xwalk/content-fragment/cf-testing.json
Check if the structured fields are present. If not, the CF model might be incorrect.
5. Additional Settings for EDS Integration
EDS requires proper JSON serialization. Check:
- Whether GraphQL APIs for CF retrieval are properly enabled.
- If Universal Editor is correctly reading JSON from /content/dam/.
Next Steps:
1. Verify the CF folder and model configuration.
2. Ensure the CF model is published and accessible.
3. Check if your variation name is correct.
4. Test the API response to verify if structured fields exist.
If the issue persists, try rendering the CF in AEM Sites to see if the issue is Universal Editor-specific.
Best Regards,
Amit Vishwakarma
Views
Replies
Total Likes
Hey @AmitVishwakarma , thanks for your help!
I tried, but it's still not working. If it's okay, could you share a dummy JSON structure for adding a content fragment in EDS with the Universal Editor?
Views
Replies
Total Likes