Section edits not updating (stylesheet and javascript)

Hello

Recently, editing on sections of a Shopify theme no longer works. The HTML part works and update well, but it is now impossible to edit the javascript and stylesheet part of a section.

In short, when I edit what is between the tags “{{javascript}}” or “{{stylesheet}}”, the changes don’t appear on the site. I have been working on this theme for several weeks, but this problem has just appeared.

It’s strange.

(I know that the “update trigger” happens when we edit the HTML… but it’s just not working right now.)

Thanks in advance for helping me.

You can try use … and … tags instead.

The problem resolved by itself…

I don’t know why. If this happens to you, try changing the active theme on your store for another theme. Then come back to your original theme you were working on. This may be the solution.

Regardless, the important thing is that it works now. Thanks for the help.

Confirmed this is still an issue in 2022. Deploying updates via themekit which include changes within a {% javascript %} tag will sometimes not appropriately reflect on the deployment target until a republish or manually saving the affected file within the admin code editor 2-3 times.

I suspect the bundled scripts.js file where all javascript tag content lives is getting server-side cached and is not invalidated as often as it should be.

+1

I often find edits in {% stylesheet %} not being registered. The hotfix for me is to add a new line at the bottom of the stylesheet every time it happens.