CQ/moments is not defined | Community
Skip to main content
August 31, 2016
Solved

CQ/moments is not defined

  • August 31, 2016
  • 3 replies
  • 1612 views

In my project, we have set up a AEM package containing ACLs, user and groups definitions. This worked perfectly well in AEM6.1: ACL, user and groups were installed and are working. 

I tried to install the same package in AEM6.2. The installation works well and the permissions are also set as desired. But after a restart, the project explorer and sitedamin do only display a white page and the JS console of the browser show an error "Uncaught ReferenceError: CQ is not defined" (for project explorer: "Uncaught ReferenceError: moments is not defined").

 

Anybody had this behaviour before?

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 vmehrotr

Closing the thread with daycare solution

The reason is that it overwrites the existing Access Control List and only the Access Control Lists from your package remain valid. 
Therefore you will have to change AC Handling in the Advanced tab when compiling the package.
At the moment you have Overwrite in there which is why you get your problems. 
You should have MergePreserve in there so that the existing ACLs do not get overwritten.

This should solve the problem.

3 replies

smacdonald2008
Level 10
August 31, 2016

This could be a bug. I recommend opening a ticket. I have never heard of this.

September 1, 2016

Seems like it. :(

/libs/rep:policy seems to be the issue

I played around a bit and found out, that the /libs/rep:policy node that is written by the package seems to cause the problem. Though I do not know why.

If the /libs/rep:policy node is present in the package, on installation a warning is output: "Warning: the file /libs/rep:policy in this package is overlaid by /apps/rep:policy. /libs/rep:policy will not be active. Ignore this message if this behaviour is intended."

I raised a ticket at the daycare ticket system.

vmehrotrAdobe EmployeeAccepted solution
Adobe Employee
September 16, 2016

Closing the thread with daycare solution

The reason is that it overwrites the existing Access Control List and only the Access Control Lists from your package remain valid. 
Therefore you will have to change AC Handling in the Advanced tab when compiling the package.
At the moment you have Overwrite in there which is why you get your problems. 
You should have MergePreserve in there so that the existing ACLs do not get overwritten.

This should solve the problem.