Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Rendition is missing in new Content Fragment Model

ramaem12
Level 3
Level 3

Previously, we used a Simple content fragment model(OOTB) to create CF and reading programmatically using the Original rendition created under each file. The 6.5.10 simple fragment model is deprecated, so we created a new Content fragment model that does not create renditions.

 

Is anyone know why it is not creating any renditions under file with the new Content fragment model?

 

With Simple fragment Model it is creating rendition -

ramaem12_1-1634551787086.png




With New custom content fragment model --

ramaem12_0-1634551757216.png

 



1 Accepted Solution
kishorekumar14
Correct answer by
Level 9
Level 9

Hi @ramaem12 ,

 

I am not sure on the renditions difference between two but i guess if you use Content Fragment API you just need a CF path to get its "Original" data.

 

//Get the resource of content fragment as below.
Resource fragmentResource = resourceResolver.getResource(“/content/dam/fragments/my-test-fragment”);

//Adapt it to a fragment resource
if (fragmentResource != null) {
ContentFragment fragment = fragmentResource.adaptTo(ContentFragment.class);
 Iterator<ContentElement> elements = fragment.getElements();
while (elements.hasNext()){
ContentElement element = elements.next();
} }

https://aemdeveloper.wordpress.com/2017/08/22/create-access-the-content-fragment-programmatically/

 

View solution in original post

4 Replies
kishorekumar14
Correct answer by
Level 9
Level 9

Hi @ramaem12 ,

 

I am not sure on the renditions difference between two but i guess if you use Content Fragment API you just need a CF path to get its "Original" data.

 

//Get the resource of content fragment as below.
Resource fragmentResource = resourceResolver.getResource(“/content/dam/fragments/my-test-fragment”);

//Adapt it to a fragment resource
if (fragmentResource != null) {
ContentFragment fragment = fragmentResource.adaptTo(ContentFragment.class);
 Iterator<ContentElement> elements = fragment.getElements();
while (elements.hasNext()){
ContentElement element = elements.next();
} }

https://aemdeveloper.wordpress.com/2017/08/22/create-access-the-content-fragment-programmatically/

 

View solution in original post

bangar50
Level 7
Level 7

Hi @ramaem12 ,

                           Yes, Can you please try on Vanilla instance  and if issue still persist then raise issue to the concerned team.

 

Regards,

Sanjay

Ankur_Khare
Community Advisor
Community Advisor

Hi,

When you are creating the content fragment could you please check the logs and let us know whats coming there.

Albin_Issac
Community Advisor
Community Advisor

The content is stored under data node in latest AEM versions(not sure from which version), refer to the below image. The rendition folder is empty but the variations and the content is stored under data node

 

Repoinit.png

 

 

I was using specific logic to handle this - https://github.com/adobe/aem-core-wcm-components/blob/master/bundles/core/src/main/java/com/adobe/cq... (Just for your info) but as @kishorekumar14  mentioned use the Content Fragment API to fetch the content.

Regards

Albin I

www.albinsblog.com