Jump to content

Script Disabled

Go to solution Solved by paul2009,

Recommended Posts

Hey there!

I'm currently finishing a website that was started by another user -- it hasn't been published yet.

The site is mostly stock, built using one of Squarespace's templates. As far as I can tell, there is only one piece of embedded custom code which is for CanadaHelps' donation form. The code for the form is directly from CanadaHelps (and is currently working on our old website). Sometimes I can see the form in development and everything looks OK, other times I'll be working on the site and there will be an error message where the code is inserted. When I edit the page, there is an error that has replaced where the form is located that reads "Script Disabled".

Does anyone have any tips on why this is happening. I am not a developer; I am volunteering to help this small non-profit launch their website.

This is the code:

<script id="ch_cdn_embed" type="text/javascript" data-page-id="41124" data-cfasync="false" data-formtype="0" src="https://www.canadahelps.org/services/wa/js/apps/donatenow/embed.min.js"></script>

I checked the forum for similar posts and found something about viewing pages in incognito. I launched Squarespace incognito, but the error is still there when I edit the page.

Many thanks for any suggestions!

V

Edited by Veryfastcar
more information
Link to comment
  • Solution
32 minutes ago, Veryfastcar said:

I'm currently finishing a website. It hasn't been published yet.

As far as I can tell, there is only one piece of embedded custom code which is for CanadaHelps' donation form. Sometimes...there will be an error message where the code is inserted. When I edit the page, there is an error that has replaced where the form is located that reads "Script Disabled".

It's normal for code to be disabled in the preview pane whilst you are logged on to the site. This is because it can cause problems within the Squarespace editor.

You'll therefore want to open the site in a separate browser window whilst you are not logged into Squarespace. To do this:

  1. First check that you can view the site without logging in by opening a new Incognito (or Private) window.
  2. Go to the site's domain name (something.squarespace.com) by typing this into the address bar at the top of the browser window. Don't add '/config' at the end. 
  3. If you see a message saying that the site is private, you'll need to return to your other browser window - the one where you are logged into Squarespace - and set a public password in the visibility settings. When this has been set, return to the Incognito window, refresh the page and use the public password. You'll now be able to view the site like a normal site visitor, instead of the site owner.

Does the code work now?

If not, please share the domain name and the public password with the community so that we can take a look.

About me: I'm Paul, a SQSP user for over 18 yrs and a Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF.DIGITAL, providing high quality original extensions to supercharge your Squarespace website. 
Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links.
Forum advice is completely free. You can thank me by selecting a feedback emoji below. Buying a coffee is optional.

Book paid help with domains: Connect a GoDaddy domain. Connect a Squarespace Domain. Domain assistance

Link to comment
5 minutes ago, paul2009 said:

It's normal for code to be disabled in the preview pane whilst you are logged on to the site. This is because it can cause problems within the Squarespace editor.

You'll therefore want to open the site in a separate browser window whilst you are not logged into Squarespace. To do this:

  1. First check that you can view the site without logging in by opening a new Incognito (or Private) window.
  2. Go to the site's domain name (something.squarespace.com) by typing this into the address bar at the top of the browser window. Don't add '/config' at the end. 
  3. If you see a message saying that the site is private, you'll need to return to your other browser window - the one where you are logged into Squarespace - and set a public password in the visibility settings. When this has been set, return to the Incognito window, refresh the page and use the public password. You'll now be able to view the site like a normal site visitor, instead of the site owner.

Does the code work now?

If not, please share the domain name and the public password with the community so that we can take a look.

Thank you, Paul, for your thoughtful and fast response! I've requested the site password so that I can do what you've suggested. I'll give that a go and let you know if it works. It sounds logical and likely what's happening.

Cheers!

Link to comment
  • 3 months later...

Hello! 

I'm getting the message that my code is disabled as well. I tried in another browser where i'm not logged into square space, but the entire code just shows up. 

<script type="text/javascript" src="https://app.getresponse.com/view_webform_v2.js?u=BpMDb&webforms_id=29996703"></script>

I tried inserting it on a page with a code element (javascript). 

I also tried to added it to advanced settings code injector in the header (this just disables some of the images on my site). 

What should I do?

Thank you. 

Screen Shot 2021-08-05 at 10.21.34 PM.png

Edited by justbeout
added an image
Link to comment

@justbeout

You want exactly these settings to run <script> tags in a code block.

1257146637_ScreenShot2021-08-06at10_11_56AM.png.2e108a0fa45a25f0f3428647db556eb8.png

Of course replace the script tags shown with the code you want to run.

Any other settings and the code will not run. For example the Javascript mode is for displaying Javascript code not running it.

Once the code is entered properly doesn't guarantee that it will function. Those are two separate issues.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment

Thank you for your response @creedon! I'm still confused

"For example the Javascript mode is for displaying Javascript code not running it." What does that mean? In the code element option they have Javascript but it doesn't work? 

How can I modify my Javescript <script type="text/javascript" src="https://app.getresponse.com/view_webform_v2.js?u=BpMDb&webforms_id=29996703"></script> 

so it goes between <script> </script> 

It's really frustrating because SS claim you do not need coding skills to create a site, yet the script provided by my email marketing company does not work and I have to modify and it does not guarantee it will still work

 

Link to comment
On 8/7/2021 at 8:11 AM, justbeout said:

Thank you for your response @creedon! I'm still confused

"For example the Javascript mode is for displaying Javascript code not running it." What does that mean? In the code element option they have Javascript but it doesn't work? 

How can I modify my Javescript <script type="text/javascript" src="https://app.getresponse.com/view_webform_v2.js?u=BpMDb&webforms_id=29996703"></script> 

so it goes between <script> </script> 

It's really frustrating because SS claim you do not need coding skills to create a site, yet the script provided by my email marketing company does not work and I have to modify and it does not guarantee it will still work

 

If you want form appear on one page, add a Code Block >> Paste the script code >> then open incognito window >> see the result

If you want it appear on entire site, add it to Settings > Advanced > Code Injection > Footer

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • 2 weeks later...
On 8/6/2021 at 10:17 AM, creedon said:

@justbeout

You want exactly these settings to run <script> tags in a code block.

1257146637_ScreenShot2021-08-06at10_11_56AM.png.2e108a0fa45a25f0f3428647db556eb8.png

Of course replace the script tags shown with the code you want to run.

Any other settings and the code will not run. For example the Javascript mode is for displaying Javascript code not running it.

Once the code is entered properly doesn't guarantee that it will function. Those are two separate issues.

@creedon Could you help me as well? This is what I have for my code snippet and it's not displaying either; says script disabled. I have tried to check via an incognito browser and it does not display. 

<script type="text/javascript" src="https://marana.zoomprospector.com/common/scripts/compareplaceswidget.iframe.js?sst=MARANA&environment=production"></script>

Thank you, 

T

Link to comment

@creedon Ha! Nevermind, I got it to work. To summarize for the next person who has this issue: 

1. Make sure you have the script type identified properly IE; <script type ="text/javascript"> along with the proper src location. 
2. Make sure you hit save. Ha! Seems silly, but I've made that mistake of overlooking that.
3. Make sure you check your site in a regular browser session and/or check the edit page while incognito. 

Thank you all!
T

Link to comment
  • 1 month later...

Hi @creedon,

I have a code block on my page that was previously working - when I checked it the other day, it was not visible from the public URL (while logged out and on multiple browsers/devices).  When I go into edit mode, I see "Script Disabled".  When editing the code block and then saving, I see a block show up for about half a second with a button for preview in safe mode and then it flashes away to be replaced by "script disabled".  Can you please help?

https://www.kimgotbengaged.com/registry

<br><script id='script_myregistry_giftlist_iframe' type='text/javascript' src='//www.myregistry.com//Visitors/GiftList/iFrames/EmbedRegistry.ashx?r=kk0KBTl1z7VaeUMIskhK5Q2&v=2'></script>

image.thumb.png.5591609a65ce5a33d6d1e8cccb80f6c9.png

Link to comment

@shogun301

It appears that you need jQuery for the code to work. I don't know if it was installed on your site and went missing or if the my registry code called it in and now doesn't.

Add the following to Settings > Advanced > Code Injection > HEADER.

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>

Let us know how it goes.

Edited by creedon

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.