Content of website_script.js

Dear colleagues,

we have a strange content in the “website_script.js” file. The first part is loaded from the Website Script doctype, but then additional code is loaded. Has anyone else seen this, and where can this load other code from?

Solution in case someone else is looking for this:

website_script.js is loaded (see frappe/www/website_script.py) is loaded from the script defined on the “Website Script” (single doctype) and appends javascript from the “Website Theme” which is active. In our case, after some migration steps, code remained in both css an js parts of default theme, but deleting the content in the front-end did not remove the content in the database (save had no impact on the database content). Only once the “tabWebsite Theme” was purified (content of columns css and js were set to “”), the content of /website_script.js was correct.

Hello @lasalesi

Trust this finds you well…

I seem to be having similar issue, would you please share a full detail how you were able to resolve this…

Below is my login in page screenshot and warning message from my browser console

browser console

Could it be that you are observing an issue with the website theme instead? To be noted that if you add a website theme in v12 and later, the base themes are dropped. If you want them, you’ll have to include them again:

@import url("erpnext-web.css");
@import url("frappe-web-b4.css");

Does that help?

Thank you for the prompt response

Please how do I import or include these scripts?

You can only add the above lines to the Website theme content (the code above)…

Were you reading/writing data in doctype from the website script?