Adobe Experience Manager ClientContext geolocation on publish | Community
Skip to main content
October 16, 2015
Solved

Adobe Experience Manager ClientContext geolocation on publish

  • October 16, 2015
  • 6 replies
  • 1285 views

I have problem with ClientContext in publish. Most specifically this javascript code on a page:

var geolocationStore = CQ_Analytics.ClientContextMgr.getRegisteredStore("geolocation");

Geolocation store is not working in publish mode while in author works, and stores like facebook, or marketing work on both, author and publish.

Can you please tell me if i missed something, because everything except this seems to be ok.

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

Use 'Activate Tree' to activate the node /etc/clientcontext

6 replies

Sham_HC
Level 10
October 16, 2015

Make sure to activate client context configured.   That is from design mode of page in author find client context path  as shown in sample [1] and then make sure to activate that cliet context.

[1]  http://helpx.adobe.com/experience-manager/kb/turn-off-geolocation/_jcr_content/main-pars/image_0.img.png/Change_Path.png

October 16, 2015

No, the tree is activated. But I did found out something new, what might be the reason it does not work on publish.
My client context on admin worked, but then I cleared  /var/classes and /var/clientlibs nodes, and suddently it doesn't work on admin any more. 
I do have my store under 
/etc/clientcontext/default/content/jcr:content/stores and client context under apps referenced from store (you can see the structure in the image [img]cctree.png[/img]).

Now, the thing is that my init.js gets run (I did debug), but the stuff from kernel or the ui lib does not, and my client context does not get initialized.
I guess this is the reason why it does not work, but I do not know why /var/ node has anything to do with it, and why it stopped working after cleaning it.

October 16, 2015

I did activate the client context. I have my  /libs/cq/personalization/components/contextstores/geolocation nodes published. 

Also I do not have client context as a component you shown.

Sham_HC
Level 10
October 16, 2015

I was not referring to component instead of design.   You will see that only in design mode. Can you try activating /etc/clientcontext/default

Working in author & not on publish is many times because of mismatch of all the required content/template/component between instances.

October 16, 2015

Yes I did activate this node. But still it does not work correctly. i actually publish this in a way shown in attachment, by activating the page. But i just checked and republished this complete node /etc/clientcontext and it is completely in sync with publish instance.

Lokesh_Shivalingaiah
Lokesh_ShivalingaiahAccepted solution
Level 10
October 16, 2015

Use 'Activate Tree' to activate the node /etc/clientcontext