2

Squarespace does not offer any documentation or support for their developer mode, so I am hoping that someone has run into this catastrophic error and figured out a workaround.

The normal edit => commit => push pattern results in Squarespace frequently losing the top half of the website, as if the css were gone. I suspect that the less files are not being properly recompiled, but it seems quite clear the site is stuck in this mode.

Several times I have been able to recover by git reset and then pushing the reset (verifying that files on the other side are corrupted). Other times this has not fixed anything and I have not been able to determine any option other than reset by turning developer mode off and on - obviously not a solution, since it throws everything away.

This has utterly undermined any ability to work.

Does anyone know what causes this or how to resolve it?

Squarespace support does not seem interested in helping in any way...

Asher
  • 1,195
  • 1
  • 11
  • 19
  • "..as if the css were gone" – Squarespace uses their own special flavour of less, I would check for error messages in your compiled site.css. If the compiler runs into an error, it stops. – jfox Aug 10 '17 at 21:55

1 Answers1

2

Turns out that Squarespace caches compiled less templates and does not clear or reset the cache for variable values when a new template is compiled.

I'm not clear on how this ever makes sense, but they seem to have consciously made the decision to handle things in this way?

The result seems to be that many valid template modifications will crash the entire site, which will not recover until the cache is cleared.

I figured out that it is possible to force the cache to clear by logging in via SFTP, uploading the new less file, removing the less file from the included less file list, reload the site so it does not find the less file (and flushes the cache), then add the less file back to the file list, and the next reload should occur without any cached values.

Thanks Squarespace!

Asher
  • 1,195
  • 1
  • 11
  • 19
  • Some additional context/info: both the FTP and Git repository correctly show the updated version of the file. While, view source code on my production URL (https://www.example.com/1234) shows the prior version of the file, the squarespace version of the URL (https://xxxxx.squarespace.com/1234) shows the updated file. – joelhaus Jun 15 '20 at 16:52