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.
Solved! Go to Solution.
Views
Replies
Total Likes
Use 'Activate Tree' to activate the node /etc/clientcontext
Views
Replies
Total Likes
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.
Views
Replies
Total Likes
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.
Views
Replies
Total Likes
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.
Views
Replies
Total Likes
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.
Views
Replies
Total Likes
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.
Views
Replies
Total Likes
Use 'Activate Tree' to activate the node /etc/clientcontext
Views
Replies
Total Likes