Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Getting Ajax Error (Enabling CORS)

Karl515
Level 5
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
Karl515
Correct answer by
Level 5
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
smacdonald2008
Level 10
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.

Karl515
Level 5
Level 5

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

Veena_Vikram
Community Advisor
Community Advisor

Are you trying this in your local or DEV env ?

smacdonald2008
Level 10
Level 10

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

Karl515
Level 5
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.

Karl515
Level 5
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!

Karl515
Level 5
Level 5

Hello Sir!

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

Karl515
Level 5
Level 5

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

Veena_Vikram
Community Advisor
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

Karl515
Level 5
Level 5

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

Karl515
Correct answer by
Level 5
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