Expand my Community achievements bar.

SOLVED

Getting Ajax Error (Enabling CORS)

Avatar

Level 5

1625599_pastedImage_0.png

Following this Tut on how to enable CORS

Adobe Experience Manager Help | Understanding Cross-Origin Resource Sharing (CORS) with AEM

but upon saving, I'm getting that error and to no avail I have fixed it. had to ask forum.

THANKS!

1 Accepted Solution

Avatar

Correct answer by
Level 5

We created  live environment and the problem was sovled!

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

View solution in original post

13 Replies

Avatar

Level 10

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.

Avatar

Level 5

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

Avatar

Community Advisor

Are you trying this in your local or DEV env ?

Avatar

Level 10

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

Avatar

Level 5

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.

Avatar

Level 5

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!

Avatar

Level 5

Hello Sir!

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

Avatar

Level 5

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

Avatar

Community Advisor

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

Avatar

Level 5

Ah! I'm running local env. we use local or live here

Avatar

Correct answer by
Level 5

We created  live environment and the problem was sovled!

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