Short description of issue
the …/compiled_assets/style.css file that is generated by Shopify in my theme randomly changes to code that has nothing to do with my theme.
Reproduction steps
I have created a custom theme using Shopify’s relatively new theme blocks. To organize my code and to take advantage of Shopify’s asset compiling, I’ve used {%- stylesheet -%} tags extensively in all of my blocks/sections. This has been working very well during development but just recently, while preparing for launch of my new site, the …/compiled_assets/style.css file that is rendered by Shopify is intermittently loading the wrong CSS. I will load the page one time and everything looks right and reload a second later and the CSS in that file is completely different.
I have confirmed that when the CSS is incorrect, the contents of that compiled CSS file is for the Horizon theme, not my new theme. My theme is 100% custom and not based on Horizon in any way so I can only assume that when the compiler fails, it falls back to the Horizon CSS? Otherwise, I have no clue where this additional CSS is coming from.
Additional info
Also for Troubleshooting, I have removed all other themes form the store. There are no apps running or installed on the store. I have confirmed the issue in incognito as well as when logged in and previewing the store. I’ve also made changes to my CSS to force a recompile but that didn’t resolve the issue either.
I have reached out to Shopify support and they were about as helpful as usual, falling back on not being able to provide any support for a custom developed theme. They told me it must be a problem with my theme since the Horizon theme they tested works perfectly. I told them that if the compiler if falling back to the Horizon CSS when failed, this test would not show us anything useful but they insisted that this was definitive proof that the issue is with my theme.
I know if I just pull all my CSS out of my blocks and sections and instead place them in a stylesheet in my theme assets folder everything will work but I really wanted to use Shopify’s new feature.
What type of topic is this
Troubleshooting
Bug report
1 Like
Am noticing this issue too. Have been trouble shooting issues all day that have randomly fix themselves only for new different ones to arise an hour later
Hey all, thanks for reporting this. The issue should be resolved now. Let me know if you do see any changes though.
1 Like
@KyleG-Shopify On the one hand, thank you so much for fixing the issue. You are a rock star. On the other hand, the Shopify Support team needs to STOP completely walking away from developers who are custom developing themes and applications. I cannot count how many times I have clearly identified issues with the platform and clearly shown to support how it couldn’t possibly be the theme I’m building but they still stick to “You built it, you’re on your own“. And I’m sorry but if one more support person tells me the solution is to go hire a Shopify Partner to fix my problem I’m going to snap. I have been a Shopify Plus developer for over 10 years and if I cannot troubleshoot my own code, I’m not sure what someone else is going to be able to do for me.
I get that the front-line chat support people are not developers but at the same time, them telling me I have no other recourse besides hiring someone and that there is no possible way this is an issue with Shopify itself needs to stop. This has been the case with your support chat for years and based on other developers I talk to, it’s almost a running joke at this point.
Sorry to unload on you. You fixed the issue so you are my hero today. I’m just frustrated having now spent over 9hrs straight troubleshooting and partially rebuilding my code today (which I now need to undo). We are launching our new site in less than two days and I just burned all of today, apparently for no reason. Just infuriating.
Hey @Jeff_Nelon, glad it’s working! No need to apologize, this feedback is valuable and I’m passing it along.
Regarding the frustration, you clearly knew this wasn’t your code, and getting walked through basic steps when you’ve been on the platform 10+ years is rough. For context, the typical investigation process our support teams go through is built for a wide range of skill levels, which means it starts at square one. That doesn’t help when you’re two days from launch and already know what the problem isn’t.
For future chats, here is an example of what support typically checks for theme related issues. Coming in with this in hand can speed up the process to get to the core issue:
- Fresh theme test - Install a fresh Horizon (or other default Shopify theme) and test there. If it replicates, that’s the clearest signal it’s platform-side, not your code.
- Apps disabled - Disable ScriptTag scripts, app embeds, and app blocks in the theme customizer. If the issue disappears, re-enable one by one to find the culprit.
- Incognito + different browser - Rules out cache, cookies, and browser extensions. Also try a different device if possible.
- Console errors - Screenshot the Console and Network tabs in DevTools. Error messages, file names, and line numbers help pinpoint where things are breaking.
- Repro steps - Exact sequence to trigger the issue. “Go to X, click Y, see Z” format works well.
- Timeline - When it started and what changed around then (theme update, app install, code change). This narrows down the cause.
- Version testing - If you have older theme versions, test backwards to find when it broke. Helps isolate whether it’s a theme change or something else.
So, if you can lead with "I tested on fresh Horizon, disabled apps, here’s the console output, here are the steps, it started after X and here is why I’m confident this is not an issue with my theme and something you need to look in to "; that can definitely help ensure more experienced theme experts are called in earlier to help.
That said, we’re working on improving the live chat experience for developers. If you have other ideas on what would make that better, I’d like to hear them and pass those on as well.
@KyleG-Shopify your feedback is spot on and generally stuff I do when reaching out to support. These were things I actually went over with the support agent this time around as well. They are very valid steps however the support team sometimes relies on them too much. I sometimes am having an issue with a feature in my theme that is unique and not present in other themes. It is working perfectly but the Shopify Backend, API or endpoint I’m accessing is failing. Even if I’m able to clearly explain this to the support agent, when they do not have the same issue when testing the site with let’s say Horizon which doesn’t have this functionality, they immediately jump to it being an issue with the theme and end the call.
I’m totally okay with the support team being limited with this type of technical knowledge. I just wish they were a little more open to keeping a case open or escalating some of these more technical issues instead of definitively ending the conversation.
I have found success posting many of these problems to this community forum where the Shopify team is good about responding so credit where credit is due. It’s just hard when Shopify doesn’t have a more immediate means of support for the developers in this community. You were very quick to find a resolution but often, it can take weeks or even months to get thing solved here which is a real challenge for the platform.
Again though. Thanks for you help. Really appreciate it.
1 Like