Expand my Community achievements bar.

SOLVED

Adobe Experience Manager ClientContext geolocation on publish

Avatar

Level 2

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.

1 Accepted Solution

Avatar

Correct answer by
Level 10

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

View solution in original post

6 Replies

Avatar

Level 10

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

Avatar

Level 2

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.

Avatar

Level 2

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.

Avatar

Level 10

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.

Avatar

Level 2

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.

Avatar

Correct answer by
Level 10

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