Jump to content

After adding code block with javascript, Edit page broken

Recommended Posts

Site URL: https://www.divinecompasshealing.com/playlists

I used a code block to add this GetResponse form.  I selected HTML and unchecked display source.  In production, the form works. 

However, when I click Edit on that page, nothing happens.  I cannot edit it.  If I do an incognito window with /safe on my url (so scripts disabled), then I can edit the page.  Is this normal?  Or what am I doing wrong?

 
<script type="text/javascript" src="https://app.getresponse.com/view_webform_v2.js?u=xxxxx&webforms_id=xxxxx" data-webform-id="xxxxx"></script>

And any plans for squarespace to have a formal integration with getresponse?

Link to comment
  • 1 month later...

I have this exact problem when I add a Calendly popup on the page via the code block.

I can edit header and footer only, but the rest of the page doesn't show the drag'n drop lines. After logging out and back in, or clearing cache several times, I can finally edit other blocks, but when I try and move them they all go to the top of the page and I can't place them anywhere else.

Any idea how to fix this?

 

Link to comment
  • 9 months later...

I'm also having this issue.  Whenever I add a code block for my calendly embed, none of the images show and other things are breaking. I would really like the calendar embed to show, but the problem is only fixed when I delete the code block. What can be done here?

Link to comment
On 1/15/2022 at 5:13 AM, KatGrace said:

I'm also having this issue.  Whenever I add a code block for my calendly embed, none of the images show and other things are breaking. I would really like the calendar embed to show, but the problem is only fixed when I delete the code block. What can be done here?

Can you share link to page where you added calendly? We can check easier

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 months later...
  • 1 year later...
8 minutes ago, Steve777 said:

I'm also having an issue when I embed a script.  I can't edit the page in squarespace anymore once i add it. 

What can we do to try to address this?

Please post the URL for a page on your site where we can see your issue.

A link to the backend of the your site won’t work for us, i.e. a url that contains /config/.

Please set up a site-wide password, if your site is not public and you've not already done so.

Post the password here.

Adding a site-wide password does not allow anyone to alter your site. It only allows those with the password to see your site.

Please read the site-wide password and how to share a link documentation to understand how they work.

We can then take a look at your issue.

You may find How to post a forum question post useful.

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
On 5/7/2023 at 8:33 PM, Steve777 said:

Thank you for your help.

It wasn't much unfortunately. I looked for one of the common issues code can have, that of being malformed. After a cursory glance the code looked OK structure wise.

You can temporarily disable code in your site. Please see @paul2009's reference. Be sure to cancel safe mode once you no longer need it.

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
6 minutes ago, Steve777 said:

So does this mean that every time I need to edit, I will have to delete my old version and create a new version with the same URL?

Using the safe mode doesn't necessarily  require duplicating pages or changing URLs. It is meant to turn off custom code that is interfering with normal behaviour. You get in, make a change, and then turn safe mode off.

Now this obviously is not ideal if you need to edit the page regularly. Safe mode is more of an emergency step.

Quote

I  imagine there should be a solution for this.

There might be but from what I could see from the outside there wasn't anything obvious. If you are unable to diagnose then you will need to give someone with the technical skills administrative access to your site to be able to dig in and see what is going on and if there is a solution. Be aware that some code is just not compatible with Squarespace. Have you considered contacting the code author with your issue?

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
  • 7 months later...

I ran into the same issues here. When you inject a custom script the "Edit" button gets broken and you can't use the page any more. However, I found a workaround. If you conditionally inject your script into the page whenever it's NOT inside of an iframe, then you can safely use the Squarespace editor.

<script>
// If the current page isn't in an iframe then run the code
if (window.top === window.self) {
    var script = document.createElement('script');
    script.src = 'YOUR SCRIPT URL HERE'; // Replace with your script's URL
    document.head.appendChild(script);
} 
</script>

Now you can still use the Squarespace editor. However you wont be able to preview your custom code in the editor. I just keep the actual page open in a new tab to test things out. Hope this helps!

Edited by CPU
clarification
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.