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 with loading contexthub segmentation components

Avatar

Level 4

Team, we're in the process of implementing targeting in AEM. We are encountering some issues when adding the components in the segment editor. Could you please let me know what is missing here?

 

Missing components in the component browser.

test1234567_0-1726536810251.png

 

Below is taken from Adobe documentation.

 

test1234567_1-1726537056493.png

@EstebanBustamante 

@Imran__Khan 

@Bhuwan_B 

@RashidJorvee 

 

11 Replies

Avatar

Community Advisor

Few things to check:

Any errors on console or in logs. 
Also try checking if the logged in user has appropriate permissions.
You can also check your respective segment in crx/de (/conf/test-brand/settings/wcm/segments/chrome-users) to check if it is setup properly. If you see anything unusual there, try deleting it once maybe.
Reference :

h_kataria_0-1726560306399.png

 




Avatar

Level 4

I see the following errors in the console, but I don't think they are related to this issue.

test1234567_0-1726577197862.png
I logged in as an admin user who has all the privileges.
Also, I don't see any issues with the setup under /conf/test-brand/settings/wcm/segments/chrome-users.

 

 

 

Avatar

Community Advisor

I believe the contexthub segment policies are stored at /libs/settings/wcm/designs/default/jcr:content/segment-page , you can cross check that path once or if you have overlayed something in your project for that hierarchy then please cross check under /apps once.

Hope this helps.

Avatar

Level 4

I see the overlay only for the below path and not for **/default/jcr:content/segment-page

test1234567_0-1726582896609.png

 

Avatar

Community Advisor

Difficult to comment further without checking the actual code but few things you can check. 
Check the pageinfo.json (/libs/wcm/core/content/pageinfo.json) call in network tab on your segment page. And check the design returned in response :

h_kataria_0-1726586931686.png
You will also see a corresponding design call as well in network. Something like 
/libs/settings/wcm/designs/default/_jcr_content.1500560231670.json 

If it is something other than default, then thats where you probably need to check. 
Hope this gives you some idea to debug further, if this also doesn't help, then please provide a package of your segments and I will try to check locally once.

 

Avatar

Community Advisor

ok, I was checking on AEMaaCS SDK, you seem to be using older version of AEM.
So things might be little different on it. So, your design values are probably coming from /etc/designs/default. You can check if you have anything located under that path, ideally it should have something similar to 

h_kataria_0-1726591020494.png

 


If the /etc/design/default path itself doesn't exist then it might be wrong design pointing.
You can check if you have any design property such as cq:designPath set on your segment which is pointing to /etc/designs/default. If yes, then you can try pointing it to /libs/settings/wcm/designs/default/jcr:content/segment-page (if this path exists on your AEM version)
And I think atleast since AEM6.4 designs have moved to /libs/settings/wcm/designs 
Hope this helps.

Avatar

Level 4

Thanks for your input. I don't find any cq:designPath set on the segments. However, if I rename the /etc/designs/default, then the components are loaded in the component browser.

If I drag the components, I can see "Data loaded in the ContextHub does not resolve the current segments," which is expected.

 

test1234567_0-1726607652739.png

Once I author the values in the dialog, I don't see any messages on the page indicating whether the segment is resolved or not. Additionally, I don't see any errors in the console.

test1234567_1-1726607664409.png

 

Avatar

Community Advisor

Please check this https://experienceleague.adobe.com/en/docs/experience-manager-learn/sites/personalization/context-hu... 
It needs these 3 properties I think to show you resolved/unresolved segments properly. I tried editing the segment properties and added cq:contextHubSegmentsPath property and pointed it to the location where my segments were located i.e /conf/wknd/settings/wcm/segments
After which I was able to see which segments are getting resolved.

h_kataria_0-1726637204896.png

But please note, I don't have much experience working with contexthub, all my comments are based on tests which I did on my local. So, it is possible I might have missed something as well . But hope this helps. 

 

Avatar

Level 4

Thanks your reply. The site's root page is already having these properties(cq:contextHubSegmentsPath). Do we need to update these properties for segment pages(/conf/test/settings/wcm/segments/winter.html) as well ?

Avatar

Administrator

@test1234567 Did you find the suggestion helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!



Kautuk Sahni