AEM 6.5 experience fragment containing building block and wcmmode | Community
Skip to main content
Level 9
October 16, 2023

AEM 6.5 experience fragment containing building block and wcmmode

  • October 16, 2023
  • 3 replies
  • 2619 views

Hi ,

 

I was playing around with experience fragments and noted that if a component even core component with a check on wcmmode.edit is done in sightly , and is included on XF, it does not pick up the mode in preview or disabled mode(view as published) within XF if the component is included within a building block. 

This impacts the webpage when wcmmode disabled when XF is included with a building block. 

 

eg, I want a component to have a message if authoring mode or wcmmode is edit and in preview or disabled mode the component should not show the message on an XF and when XF is included on webpage and if the components are part of building block within the XF


1.  if the component is added within the building block , the same behavior is noted and, if you check with wcmmodes.isTouchAuthoring , it works only on wcmmode disabled and NOT preview .. 

 

Observed this behavior OOTB core components , should !wcmmode.disabled be used ? 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

3 replies

Sady_Rifat
Community Advisor
Community Advisor
October 16, 2023

Hello @nitrohazedev ,
The wcmmode for Experience Fragment on a page differs from its editing mode.
There is a similar thread that describes why it behaves like that and how can you get the expected solution: https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/when-putting-a-custom-component-inside-an-experience-fragment/m-p/586060 

Level 9
October 16, 2023

Hi @sady_rifat  thank you for the response .. I apologize firstly that I missed details and mistyped the question .. confusing the observations .. updated the original question .. the link as I see the answer is in relation to author or pub ? And not modes ,  .. also if sightly does not wonder if backend will via models with approach listed  .. I managed to find the option above using istouchauthoring, that works for view as published but not preview .. not sure if recommended .. gonna test today for !criteria but since it occurs OOTB , wondering any way vs models ? 

Level 9
October 19, 2023

@nitrohazedev Yes you are right.
Actually, from our development perspective, it seems incorrect but according to AEM architecture/concept, this is expected.


Thanks @sady_rifat , raised an adobe ticket to get them to give us a verdict on it, will update

kautuk_sahni
Community Manager
Community Manager
October 16, 2023

@nitrohazedev Did you find the suggestions from Sady helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.

Kautuk Sahni
Level 9
October 25, 2023

@sady_rifat  the adobe engineers came back saying they have a ticket raised for it to resolve after internal discussions  

SITES-16835.