I keep losing weeks of work because website won't save

Topic summary

A user experienced repeated loss of work when the Shopify theme editor failed to save changes, displaying an “Online Store editor session can’t be published” error. The issue prevented both publishing and saving any modifications site-wide.

Root Cause Identified:

  • Adding custom font code in the Custom CSS sections within the theme customizer triggered the error
  • This prevented all changes from being saved, not just the problematic code
  • Known limitations and bugs exist with Custom CSS, including restrictions on certain properties like page-width

Solutions Provided:

  • Remove code from Custom CSS sections and add it to the theme’s main CSS file instead
  • Alternative approach: Use a “Custom liquid” section in the Footer section group, wrapped in <style> tags
  • Benefits include liquid code support, no theme code edits, and easier future updates

Performance Considerations:

  • Loading fonts in the footer may have minimal impact on load times
  • For optimal performance, consider loading fonts in the <head> section with font-display: swap
  • Regular backups and frequent saves recommended when working with Custom CSS

The issue was resolved by relocating custom code from the customizer to the theme’s CSS file.

Summarized with AI on October 25. AI used: claude-sonnet-4-5-20250929.

Online Store editor session can’t be published

I keep getting the above error when trying save theme edits. I’m just trying to save it so I can continue working on it later. But, it doesn’t save, so I tried to keep the site open so that I could still work on it the next day. After a week of work I have to restart my laptop for an update, and I go to my site and it’s all gone. This is TERRIBLE for small businesses. I don’t know why it won’t let me save my work, but if I can’t get any of my content and words on the website, what is the point of having one?

I’m at my wits end with this platform and I need some export help.

PLEASE HELP ME ANYONE!!!

1 Like

Are you not able to save changes in the customizer or the theme code editor. There are times this happens but it usually goes away with a refresh or just reopening it.

Have you tried contacting support?

Did you add customized code in Custom CSS of the section, if yes, please try to remove the code and save again? Or have you edited the liquid code of that section? If yes, please try to revert the code to original version and try again?

Yes it turns out that the custom code section will make your website un-saveable. That’s a pretty bad oversight, I can understand not allowing to publish, but not allowing to save is kind of wild.

Also, why is the custom css portion there if it just wrecks the site?

Yeah, it seems that you can’t use custom CSS anymore. Which makes Shopify really rigid and surely shopify will soon be outdated if they don’t fix this issue, or atleast remove the Custom CSS tab from the customizer.

Not quite. It’s still useable and preferred way to add some small-scale CSS modifications, but it has some limitations.
Some documented – https://help.shopify.com/en/manual/online-store/themes/customizing-themes/edit-code/add-css

But also bugs – say, you can’t have page-width anywhere in section “Custom CSS”.

So, pay attention to the messages and save often.

1 Like

Hi @mijox,

Can you send me a screenshot of the error message? Is it in the code editor or customize?

I will check it.

Yes as @tim_1 suggests and @Dan-From-Ryviu pointed this issue the custom css doesn’t save only when there’s error according to Shopify or may be some css writing mistakes from us.

It is limited but actually smart enough to point out css mistakes and other warnings as per the rules set by Shopify for it.

Shopify limits code can be added in Custom CSS, so we recommend you add code to the CSS file of the theme.

1 Like

@mijox

It is not that custom code section will make your website un-saveable but code you enter. Like Tim said there are limitation and bugs. But that should not influence on text/settings you add to sections, could you share some examples/screenshots?

You have alternatives though, Custom CSS is for small, single section unique code. You have main theme CSS file, where at the end you can add your code. And that editor have a few days of revisions that you can check after. Also there is Git integration, Shopify CLI and there is good documentation about that for basic usage. So it is not quite that Shopify does not give you options.

But back to your problem, I understand you lost a week of work, but to assist you, you should give us some examples/screenshots. Like some code you try in Custom CSS and you do not see changes, is there any error message? Can you check console when you are saving for some error?

In title you say also Online store editor, so issue is not just Custom CSS, right? Again, any example code, screenshot,error message?

And have you try to copy all code from different sections, for backup in some text file on your computer, and then remove all Custom CSS you have entered, does it make that change? Does it allow to remove code or again some error appears? And does it save and make change on site.

Also try to open a new private/incognito browser window, log in again and try some code. Maybe some cache issues.

Thanks for the info. Yeah it turned out to be adding fonts in the Custom CSS sections of the CMS. That was making the platform error out, not only in publishing the “erroneous” code, but also prevents ANY changes from being saved, site wide.

I’ve removed all the code from the Custom CSS panel in the customiser and added the font code into the Theme’s CSS code. This seems to have fixed the problem.

1 Like

Glad you’ve sorted it out.

Regarding fonts – my current recommendation is to add them in a “Custom liquid” section added to “Footer” section group, wrapped with <style>...</style>

Benefits:

  • you can run liquid code like file_url to refer to font files uploaded to “Files” and you do not edit theme code.
  • “Footer” section group is rendered for all templates, so no need for repetitions
  • No theme code edits – will help with future theme updates.
1 Like

Oh that’s a great tip!! Thanks so much for that!

Does that have any effect on load times at all to have it in the footer?

I have not done any measurements, but usually you do not want to delay loading of fonts (say Dawn loads them in <head>), so I guess it’s the reasonable place to put them with minimal (if any) delay.

Depending on your theme and how it’s configured, you should be able to do it in Header section group too, but some themes do not like extra sections in Header so Footer is a safer option.

As always, you should consider pros and cons and ability to easily update your theme is important, especially for themes like new Horizon family which is still actively updated to fix bugs and add functionality.

Hi @mijox ,

Yes, embedding fonts at the end of a file can potentially affect page load time. The browser will need to load the entire file, including the fonts, before rendering the page, which might delay the display of content, especially if the file is large.

To improve performance, it’s generally better to load fonts early in the page’s head section. You can also consider using font-display: swap in your CSS to make text visible using a fallback font while the custom font loads, which helps reduce the perceived loading time.

Let me know if you need more details on how to optimize font loading!

Best,
Felix

There should have the error information when you fail to save the contents in the editor. You can share the error screenshots and I can easily identify the cause code directly.