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.
SOLVED

ClientContext not getting loaded for the logged in User

Avatar

Level 7

Hi All,

I am trying to implement personalization. In order to do so I need client context to work for me. When I am using my campaign in geometrixx-media page it is working as expected but when I am trying to drag and drop the OOTB teaser component and point it to the same component it is not working as expected. I figured that in order to get it working we need client context to be present in the application. So I included the below snipped.

<div data-sly-resource="${'clientcontext' @ resourceType='cq/personalization/components/clientcontext'}" data-sly-unwrap/>

Now I can see the with alt+ctrl+c the client context component is there but the data for the logged in profile is not getting loaded in the client context.

I have not ventured this area of AEM before so this is something new for me, and I am sure I am doing some silly mistake. Could anyone please help me out on the same.

I am using AEM 6.1

Thanks

Tuhin

1 Accepted Solution

Avatar

Correct answer by
Level 7

Solved. I was using my custom login module to login to application, so it was not loading any client context data.

Figured out that after using CQ's login component it is setting all the data in client context and it is working as expected.

Thanks,

Tuhin

View solution in original post

1 Reply

Avatar

Correct answer by
Level 7

Solved. I was using my custom login module to login to application, so it was not loading any client context data.

Figured out that after using CQ's login component it is setting all the data in client context and it is working as expected.

Thanks,

Tuhin