I copied over a website from a co-worker to my CQ instance (5.6.2 I think) and I have the problem that I can neither see the client context (+ shortcut doesn't do anything), nor does the component work that I'm supposed to fix. It shows up in the list but when I drag it onto the page it doesn't show up (it does appear as a JCR node though). Not sure if these problems are even related but I know that both things work on my colleagues machine.
I realize you guys can probably not help me without further information, but could you tell me a general approach in AEM to tackle these kind of things? Like on machine A it works, on machine B it doesn't. Is there some kind of logs or console etc. I should check? I'm new to this so any help is much appreciated!
I see two js error messages that I think could possibly be related to my client context issue, what do you think?
CQ_Analytics.SessionStore(); --> CQ_Analytics doesn't seem to have this funciton
CQ_Analytics.ClickstreamcloudMgr.addListener --> CQ_Analytics.ClickstreamcloudMgr is not defined
If CQ_Analytics is underfined, it could be only due to missing cq:include of clientcontext
<cq:include path="clientcontext" resourceType="cq/personalization/components/clientcontext" />
But I see that it is being included in the body.jsp.
I hope it is the first line just after your <body> tag and your cloud services include is the last line before </body> tag of your page component.
Please throw some light on what is returned undefined. Is it the CQ_Analytics or something else?
If nothing works out, I would recommend that you re-install your author instance afresh or package '/libs/cq/personalization/components/clientcontext' from an instance where it works fine and install it in your instance.
Seems like required client libs are not included. If repository is small then compare using  & the difference will help to find the cause.
Mm, it actually didn't say anything that I think was related to the issue. Just a bunch of *INFO* and not even remotely related *ERROR* messages.
Anyway, this issue can be closed. I'm building the component from scratch now on the Geometrixx site where I know it works. We'll port it over to the actual system when I actually get a working copy.
Thanks everybody for the help!
OK, now I actually got the Client Context to work. What I did is import/install all the packages I got from my colleague and then import the libs/cq/personalization on top of that. I noticed that one of the packages I received causes the error and even caused the CC to fail for the Geometrixx page. Still didn't figure out which particular part/line causes it to crash part something must have been overwritten.
As for the second part of my problem, the component I want to modify, it still doesn't show up when I drag it onto the page.
Thanks! That tool seems helpful, although our repository might be a little big to compare in total.
As for the missing client libs, I can see we include the Sitecatalyst libs as described in the docs (http://dev.day.com/docs/en/cq/current/administering/integrating_with_adobe_marketing_cloud/sitecatal...). Would it also show that error if I'm missing a Sitecatalyst configuration? (because I do...)
The logs show a lot of errors like this:
*ERROR* [pool-5-thread-2] com.day.cq.analytics.sitecatalyst.ImpressionsImporter SiteCatalyst configuration not found
Thanks Sham HC for the link, that really did get rid of that particular error in the logs.
I basically imported a ZIP package and installed it, didn't modify the clientlib configuration at all.
I honestly don't have a good idea of where to even start looking for the missing includes. It looks like the 'CQ_Analytics' isn't fully included.
Not sure I understand your last question, but as far as I can see it's still included. This is from the body.jsp:
<!-- to use SITECATALYST --> <cq:include path="clientcontext" resourceType="cq/personalization/components/clientcontext"/> <cq:include script="header.jsp"/> <cq:include script="content.jsp"/> <cq:include script="footer.jsp"/> <!-- to use SITECATALYST --> <cq:include path="cloudservices" resourceType="cq/cloudserviceconfigs/components/servicecomponents"/> <cq:include script="footlibs.jsp"/>
Yes, there is a missing "include" or import of the necessary libraries and those js errors will surely prevent the client context from showing up.
How did you go about copying the site, did you get all the clientlib configurations right? There might also be something else (js-related, maybe your own js files) that is causing those libraries to fail loading. Are there any traces in the actualy log files of the error or is those two lines in the web console the only thing you get ?
Also a last question, are both the analytics and clientcontext still included on your page?