Getting Ajax Error (Enabling CORS) | Community
Skip to main content
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 Karl515

We created  live environment and the problem was sovled!

Thanks everyone for the answer tho I really don't know what cause the error.

13 replies

smacdonald2008
Level 10
November 20, 2018

If you use AEM version of JQuery - it has a token that takes care of CORS issues. Create a clientlib and then add dependencies property with value of cq.jquery.

Karl515
Karl515Author
Level 5
November 20, 2018
Karl515
Karl515Author
Level 5
November 20, 2018

Hello Sir. Still getting the Ajax error. Can't even save a Sharing Policy

VeenaVikraman
Community Advisor
Community Advisor
November 20, 2018

Are you trying this in your local or DEV env ?

smacdonald2008
Level 10
November 20, 2018

Try on a fresh instance - this will tell us if issue is something is mis-configured or a server error.

Karl515
Karl515Author
Level 5
November 20, 2018

Hello! we've been trying to restart server again and again, trying different standard protocol still to no avail. we also thought it was something to do with PID so we search for a PID but to no avail.

Karl515
Karl515Author
Level 5
November 20, 2018

Oh sorry my bad. fresh instance, I thought refresh instance. we plan to do that but have not done it yet. I'll get back with the results THANK!

Karl515
Karl515Author
Level 5
November 21, 2018

Hello Sir!

Tested it in a new fresh instance yet still getting the AJAX error.

Karl515
Karl515Author
Level 5
November 23, 2018

I think it's local Env. I don't know what do  you mean by dev env.

VeenaVikraman
Community Advisor
Community Advisor
November 23, 2018

Karl515

The AEM server you are running , is it setup in your local machine and has a server as http://localhost:4502 ? If not is it in any cloud or linux box ? If so , that could be your development environment , which we call DEV