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
BedrockMission!

Learn More

View all

Sign in to view all badges

receiving a random script in case of 404 error

Avatar

Avatar
Level 1
Riten
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
Riten
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
View profile
Riten
Level 1

25-08-2020

Hello everyone,

I am facing a strange issue for the website(sorry, can't share the URL) - receiving a random script on pages in case of 404 error - which is not configured.

What could be the possible reason causing it? Any idea?

I am using AEM6.2 as instance..

 

Appreciate your help!

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Establish
MVP
Ravi_Pampana
MVP

Likes

192 likes

Total Posts

243 posts

Correct Reply

75 solutions
Top badges earned
Establish
Contributor
Shape 1
Ignite 5
Ignite 3
View profile

Avatar
Establish
MVP
Ravi_Pampana
MVP

Likes

192 likes

Total Posts

243 posts

Correct Reply

75 solutions
Top badges earned
Establish
Contributor
Shape 1
Ignite 5
Ignite 3
View profile
Ravi_Pampana
MVP

25-08-2020

Hi,

 

Are you seeing the script in view source ? If so it is being added via code. 

 

If you don't see it in view source, search in the javascript files being included, the file might be getting added from a js file. you need to check all the 3rd party javascript files, one of them may be adding that if the page is 404.

 

In chrome we can search within static files by going to "Sources" tab 

 

Screen Shot 2020-08-25 at 3.46.24 PM.png

 

Hope this helps!

Answers (6)

Answers (6)

Avatar

Avatar
Establish
MVP
BrianKasingli
MVP

Likes

644 likes

Total Posts

605 posts

Correct Reply

239 solutions
Top badges earned
Establish
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile

Avatar
Establish
MVP
BrianKasingli
MVP

Likes

644 likes

Total Posts

605 posts

Correct Reply

239 solutions
Top badges earned
Establish
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile
BrianKasingli
MVP

26-08-2020

Check your 404.jsp, basePage.jsp or basePage.html scripts, there might be code unwanted code there.

Avatar

Avatar
Boost 250
MVP
Nikhil-Kumar
MVP

Likes

251 likes

Total Posts

262 posts

Correct Reply

38 solutions
Top badges earned
Boost 250
Validate 1
Ignite 3
Ignite 1
Give Back 5
View profile

Avatar
Boost 250
MVP
Nikhil-Kumar
MVP

Likes

251 likes

Total Posts

262 posts

Correct Reply

38 solutions
Top badges earned
Boost 250
Validate 1
Ignite 3
Ignite 1
Give Back 5
View profile
Nikhil-Kumar
MVP

25-08-2020

@Riten 

Can you share the error that you are getting and where exactly it comes up ?

Thanks,
Nikhil Kumar

Avatar

Avatar
Affirm 50
MVP
Vaibhavi
MVP

Likes

216 likes

Total Posts

181 posts

Correct Reply

61 solutions
Top badges earned
Affirm 50
Validate 1
Ignite 1
Give Back 5
Give Back 3
View profile

Avatar
Affirm 50
MVP
Vaibhavi
MVP

Likes

216 likes

Total Posts

181 posts

Correct Reply

61 solutions
Top badges earned
Affirm 50
Validate 1
Ignite 1
Give Back 5
Give Back 3
View profile
Vaibhavi
MVP

25-08-2020

Hi @Riten ,

You can view a script in devtools where you can get the complete path of it. This gives clear idea on from where the script is being loaded. 

If you are still facing the issue to recognize,please share the screen shot of script

Avatar

Avatar
Validate 1
MVP
Albin_Issac
MVP

Likes

106 likes

Total Posts

119 posts

Correct Reply

33 solutions
Top badges earned
Validate 1
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile

Avatar
Validate 1
MVP
Albin_Issac
MVP

Likes

106 likes

Total Posts

119 posts

Correct Reply

33 solutions
Top badges earned
Validate 1
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile
Albin_Issac
MVP

25-08-2020

Also check, if the script is included externally through Tag Managers(DTM, Launch, or GTM) at runtime.

Regards

Albin I

www.albinsblog.com

Avatar

Avatar
Give Back 3
Level 4
SundeepKatepally
Level 4

Likes

76 likes

Total Posts

76 posts

Correct Reply

21 solutions
Top badges earned
Give Back 3
Boost 10
Boost 25
Boost 50
Affirm 10
View profile

Avatar
Give Back 3
Level 4
SundeepKatepally
Level 4

Likes

76 likes

Total Posts

76 posts

Correct Reply

21 solutions
Top badges earned
Give Back 3
Boost 10
Boost 25
Boost 50
Affirm 10
View profile
SundeepKatepally
Level 4

25-08-2020

404 can occur at one of the 3 levels

1) CDN

2) Apache(Dispatcher)

3) AEM Publish

 

Do check , first at which level it is occurring and then it would be easy to debug. In case of AEM , you need to check for custom 404 handling.

Avatar

Avatar
Give Back
Level 2
harishv63553358
Level 2

Likes

7 likes

Total Posts

7 posts

Correct Reply

2 solutions
Top badges earned
Give Back
Boost 5
Boost 3
Boost 1
Affirm 1
View profile

Avatar
Give Back
Level 2
harishv63553358
Level 2

Likes

7 likes

Total Posts

7 posts

Correct Reply

2 solutions
Top badges earned
Give Back
Boost 5
Boost 3
Boost 1
Affirm 1
View profile
harishv63553358
Level 2

25-08-2020

hi @Riten - Hope you have done this, please check the customization you have done on 404.jsp page. That might be one of the possible reasons. Do you see this script on 404 pages in direct publish instances ?