Expand my Community achievements bar.

SOLVED

Javascript file shows 403 error

Avatar

Level 1

I am trying to modify a javascript file in the clientlibs folder in the publisher instance for debugging purpose. After I add a console log and saved the file. it is showing 403 error in the page. The other JS files included to the page are loading without any issue and only the modified file is showing the error. When I try to access the file URL directly also, it is showing like I don't have the permission to access the file. 

 

Anything I need to do from the AEM side after modifying a client library file ?

 

I am actually new to AEM and so it will be really helpful if someone can point me in the right direction. 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @alwinaugustinofficial ,

 

It looks like permission issue, is it for logged-in user or anonymous (everyone)?. Are you are using webpack to build the java script library?

To debug, just open CRXDE in another tab and login with admin user and then refresh your website page and check if the java script is loading fine.

View solution in original post

4 Replies

Avatar

Correct answer by
Community Advisor

Hi @alwinaugustinofficial ,

 

It looks like permission issue, is it for logged-in user or anonymous (everyone)?. Are you are using webpack to build the java script library?

To debug, just open CRXDE in another tab and login with admin user and then refresh your website page and check if the java script is loading fine.

Thanks for the help Ritesh. Actually there was a syntax error there in the JS file and when I tried to rebuild clients lins, it was showing error. Now I fixed the error and everything is working fine. I never imagined that it will show 403 if there is an error in JS file. Thanks a lot for your help.

Avatar

Community Advisor
That is strange that the JS error is causing 403. Good that your problem is resolved.

Avatar

Community Advisor

Hi,

 

You don't have permission to modify any file on publish instance.

Please get relevant access on publish instance and try again.