Javascript alert/popup message when entering site

AI-generated summary

Akshay_Chandran recently upgraded their Discourse installation and encountered an unwanted JavaScript alert/popup that appears before the page loads, requiring users to click OK to proceed. After checking settings and searching the forum without success, they sought help. itsbhanusharma suggested testing in safe mode to isolate the issue, which confirmed the popup disappeared — indicating it was caused by a theme or custom code. Akshay_Chandran confirmed the default theme was active and shared screenshots of installed plugins and themes. itsbhanusharma then asked if any theme component or custom JavaScript code was responsible. Akshay_Chandran confirmed the alert originated from custom JavaScript code embedded in the default theme’s body section, which they successfully removed. itsbhanusharma expressed relief that the issue was resolved. The root cause was not a native Discourse feature but custom theme code, highlighting the importance of reviewing theme components and custom scripts after upgrades or migrations.

We recently updated our Discourse installation to a new version and restored the backup from the old version.

I’m still learning the settings and I can’t figure out how to disable an alert or popup message that appears before the page loads.

Users have to click OK to enter the site. I’ve checked all the settings and searched the forum, but I couldn’t find a solution. How can I remove this alert message?

This is not a native discourse popup so You’ll have to identify what is creating this message. You can test if it is a theme/theme-component on discourse by enabling safe mode

Thanks for the reply,

Entered the safe mode, now the pop-up is not showing,
In plugins section there exists these plugins

And in themes section, the default one is activated.

From where will be this alert message comes from, It looks like a Javascript alert content.

Do you have a theme component or any custom code in the theme that creates a javascript popup?

Yess, :+1:

thanks brother. I’ve found that, it is in default theme body

removed it :smile:

Glad you got it figured.