Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.

Issues while using Experience Fragments in AEM 6.5

Avatar

Level 2

Hi All,

 

I am using AEM 6.5 instance. I have created custom editable template and experience fragment based on that custom template. I have created test page based on the same editable template and added Experience fragment component. But while adding or configuring that component, I am unable to add or use my created custom Experience fragment. It is not visible when I browsed it through path browser from Experience fragment dialog.

Any pointers will be helpful.

11 Replies

Avatar

Community Advisor

Hi @akshayb35452619 , 

 

Have you enabled the custom XF in template policy ? 

Policy is like a design mode, where you can control the components to be available on page. 

Please do include custom XF in template policy and it will be available to use on a page. 

1_S2KhcVe7GilaZbwDmvc9qw.png

Avatar

Level 2
Hi Vaibhavi, I have added the XF to allowed components for the layout container policy. Still it is not visible to me as mentioned by you in the above screenshot. What might be the issue?

Avatar

Community Advisor

Hi @akshayb35452619 ,

 

Is your compoent has dialog or editconfig node? Either one should be present inorder for component to be available in front end. Please check this.

If the issue still not resolved , please share the package. Will have a look 

Avatar

Level 2

Hi Vaibhavi,

 

I am using XF component from General group and it has dialog node associated with it. 

I have attached the package including the editable template, XF and the page on which I am trying to use it. Let me know for any questions.

Avatar

Community Advisor

HI @akshayb35452619,

If you are unable to locate the newly created XF in path browser of XF component (below screenshot 1), then add cq:xfVariantType property to the XF editable template's initial/jcr:content (screenshot 2)

Example : /conf/learnings/settings/wcm/templates/xf-editable-template/initial/jcr:content

After setting this, create new XF page out of the XF template and then try locating the newly created XF -> you should be able to see it available as you navigate via Path Browser (Experience fragment variation path) field

Screenshot 1:

xflocation.png

Screenshot 2:

xfvariantType.png

 

Reason for adding this :

If you observe the dialog field (Path browser for choosing XF page), it has a property named "variant" -> web.

This is compared with cq:xfVariantType property in the XF page (master variation) which will be available if we add it at template level (to be available in all XF pages created out of that template)

Note : If you don't have any other variation like facebook/pinterest, then we can set it at editable template-type itself. (to flow to template and hence to XF pages) 

xfpagefragment.png

Avatar

Level 2
Hi Vijaylaxmi, I have added the required property at the node but still issue persists. I am using custom editable template and created XF based on that template. Also testing addition of XF to page created based on that custom Editable template.

Avatar

Community Advisor

Hi @akshayb35452619,

After adding the property to the editable template, did you try creating new XF page out of it ?

It might not work for the already created XFs(by then the property is not available)

Can you confirm on the below

  • By the term " I am using custom editable template and created XF based on that template", you refer to the project specific structure page component created by inheriting from "cq/experience-fragments/components/xfpage" and using that newly created structure component to create editable template-type and hence editable template (initial/jcr:content and structure/jcr:content should point to your newly created structure page component)
  • Experience fragment component that you are using to locate the XF. Is it from "General" component group(/libs/cq/experience-fragments/editor/components/experiencefragment) or proxy component inherited from core component. (/apps/core/wcm/components/experiencefragment/v1/experiencefragment)

Avatar

Level 2

Hi Vijayalakshmi,

The editable template is pointing to wcm/foundation/components/page through sling:resourceType property from structure/jcr:content node of template.

Also I am using "General" group XF component.

Let me know for any questions.

Avatar

Community Advisor

Hi @akshayb35452619,

Thanks for the inputs. 

In particular, an editable template for experience fragment should have the /initial/jcr:content -> sling:resourceType as "cq/experience-fragments/components/xfpage" or inheriting from this resource. Can you confirm this.

I couldn't locate the package you have sent. 

 

 

Avatar

Level 2

Hi @Vijayalakshmi_S 

I have followed the exact instructions given by you now I can see the cq:VariantType property is showing in the XF content node but still I am unable to relocate it when we are trying to add the variation path in the XF component on page .