[Feature]: Schema errors results in the file not being uploaded at all
What area(s) will this request affect?
Theme
What type of change do you want to see?
New feature
Overview
In spite of errors, files should still always be uploaded
I've often run into an issue where a theme is live and working, I then pull the theme using the CLI, and then go into dev mode, and the theme is broken because a bunch of sections and templates were not uploaded because they were considered invalid
I believe there was a recent change which made this issue more common. It seems like if the file is manually created or uploaded to the theme without this validation process, or if the file gets into an error state after it was made, those particular chunks of the schema or sections in a template just don't get rendered. But in the CLI when you're uploading files, it will just cause the entire file to not be uploaded, causing other files that are dependent on it to not be uploaded as well. This can result in a very broken site.
I've also noticed similar behavior with the Shopify Github integration. In all of these cases, it's better to upload the file in spite of the error so it will at least partially work rather than failing entirely.
Motivation
Quite a few instances of themes that are working, and then I try to work on them in development mode, and they are broken. As well as themes where I try to create a theme from the Github integration, and the theme ends up being created in a broken state even though another theme with effectively the same code works
Here is an example, these templates didn't upload at all because of issues with a single setting in each. The page is completely broken because the template doesn't exist. This is a way worse outcome than those specific settings being broken
I support this. Especially if there’s a “backdoor” to upload broken files to the store already.
However, I think this should be pushed to a theme push flag and not default behavior. Personally, I like the error as it’s usually my fault.
@TrystonPerry to clarify I want the default behavior to be still showing the errors but the files should also still upload
I want to know about the issues but not uploading the file is almost always a bigger issue than the error
@gonzaloriestra I'm also seeing this issue happening more frequently when creating themes from Github using the integration, is there a more appropriate place to report this issue for the github integration?
@JasonHassold were you able to find a solution for this?
@loopmanuel no real solution other than to track down and fix the schema errors, which is good to do. Shopify should still really change this behavior to make sure things break as little as possible though
@karreiro hey just wanted to see if there is any update on this or if you'd like any clarification from me :)
This issue seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action. → If there's no activity within a week, then a bot will automatically close this. Thanks for helping to improve Shopify's dev tooling and experience.
P.S. You can learn more about why we stale issues here.