Jump to content

Javascript Broke Editing Function

Recommended Posts

Posted

I added a <script> tag to my site using the code block. The script was automatically generated by Caspio DataPages to display portions of my database. The content displays just fine and functions as needed. The site works and navigates fine. However, I cannot edit the pages that have the Javascript on them. When I go to those pages, there is no edit button to click to enter editing mode. Pages without the code block added can be edited, but not the pages with the Javascript added via a code block.

Not sure if it is important, but I am currently in a free trial (want to make sure this will work before purchasing) and after entering the code it prompted me to enter Safe Mode.

Any help is much appreciated.

  • Replies 4
  • Views 749
  • Created
  • Last Reply
Posted

Do you have a link that you can share as its hard to give an answer without really seeing the code that you’ve added. 
 

The only thing that I can think off the top of my head is to check that you have the closing </script> at the end of your code. 


  • 1 month later...
  • 1 year later...
Posted

Similar problem here. And closing </script> is definitely there.

The page will load normally if not logged into Squarespace and Javascript is not returning any error.
However, it it not possible to edit that page anymore...

The inspector console when logged in does return some errors:

 
Quote

 

Unknown node type (tagName: DIV, class: undefined, id: yui_3_17_2_1_1617200706007_6507)
 
Unhandled Promise rejection: this.preview.document is undefined ; Zone: <root> ; Task: Promise.then ; Value: TypeError: this.preview.document is undefined

 

 


I found other related questions here and here, but they do not have any solution either.

Posted
On 3/31/2021 at 9:43 PM, Centerliner said:

Similar problem here. And closing </script> is definitely there.

The page will load normally if not logged into Squarespace and Javascript is not returning any error.
However, it it not possible to edit that page anymore...

The inspector console when logged in does return some errors:

 
 


I found other related questions here and here, but they do not have any solution either.

Can you share link to page where you have problem? 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!)

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.