What does "default can't be blank" mean in a Shopify theme?
The error means a setting in a section's {% schema %} has "default": "", an empty default, and Shopify refuses to save that file. The fix is to delete the default line from that setting entirely: an optional setting should have no default key at all, not an empty one.
It comes in two forms. Invalid schema: setting with id="heading" default can't be blank points at a setting on the section itself. Invalid block 'line': setting with id="byline" default can't be blank points at a setting inside a block. The cause and the fix are the same for both.
Which settings trigger "default can't be blank"?
We tested this on 5 October 2026 by uploading a small section to a Shopify development store with Shopify CLI 3.93.1, fixing one setting at a time, and recording what Shopify said after each upload.
| Setting | Where | Default we used | Result |
|---|---|---|---|
text | block | "" | Rejected: Invalid block 'line' |
url | section | "" | Rejected: Invalid schema |
textarea | section | "" | Rejected: Invalid schema |
text | section | "" | Rejected: Invalid schema |
text | section | " " (one space) | Rejected: a space counts as blank |
| all four | both | no default key | Accepted |
So it is not only block settings (our own internal notes said block only until this test). An empty or whitespace default fails on section settings too.
The same rule covers config/settings_schema.json, the file behind Theme settings. A blank default there fails with a message such as Section 2: setting with id="tagline" default can't be blank, where the number is the position of the settings group in that file.
Why do I get a new "default can't be blank" error every time I fix one?
Because Shopify reports only the first blank default it finds in each file. Our test file had four. The first upload named the block setting, the second named the url setting, the third the textarea, the fourth the text setting. Four uploads to find four problems in one file.
Skip that loop by searching the whole theme before you upload again. In your code editor, search all files for "default": "". If your editor supports regular expressions, "default"\s*:\s*"\s*" also catches the versions with extra spaces and a lone space between the quotes. Delete every match you find, then upload once.
Why does my upload also say "does not refer to an existing section file"?
That second error is a consequence of the first. When Shopify rejects sections/quote.liquid, the file does not exist in the uploaded theme, so templates/index.json, which asks for a section of type quote, now points at nothing. In our test it disappeared on its own as soon as the last blank default was removed. Fix the schema error and ignore the template error until you have uploaded again. Our guide to why a Shopify theme ZIP will not upload covers this pattern of one real error hiding behind a louder one.
Why didn't shopify theme check catch it?
Because it does not check for it. We ran shopify theme check --output json on the same file with all four blank defaults and it returned an empty list: zero offenses. The rule is enforced by Shopify's servers when the file is saved, not by the local linter. That is why the error tends to appear for the first time during shopify theme push, a ZIP upload, or a GitHub sync, after every local check has passed.
Will deleting the default change how my section looks?
No. A setting with no default starts empty, which is what "" was trying to say. Liquid that guards with {% if section.settings.heading != blank %} behaves the same either way. The only difference is that Shopify accepts the file.
If you want the field to arrive filled in when someone adds the section, give it real text instead, such as "default": "Our story". That is also a better experience in the theme editor, because the merchant sees what the field is for.
What are the other rules for schema defaults?
Shopify's input settings documentation sets out a few more rules that produce similar upload errors:
- The default is optional on almost every setting type. Leaving it out is always allowed except where noted below.
urlsettings reject a hardcoded path such as/pages/aboutas a default, with a different error:default must be a string or datasource access path. Leave the default out instead.richtextdefaults must be wrapped in<p>or<ul>tags.font_pickerandrangesettings require a default.video,image_picker,product,collection,blog,articleandpagesettings do not support a default at all.
If you are not sure whether a setting belongs on the section or on a block, our explainer on the difference between a section and a block covers where each lives in the schema.
Where does this error usually come from?
Mostly from generated or copied code. A field added by a tool or an AI assistant often gets "default": "" as a placeholder, because in plain JSON an empty string looks harmless. It was one of the first errors logged in Themr's own catalog of failed theme uploads, on 1 May 2026, when a generated review block shipped a blank default and the push stopped. Themr now strips blank defaults from every theme before it is zipped. If you would rather start from a finished design than debug a schema, browse the free Shopify themes in our gallery.
Frequently asked questions
What does "setting with id default can't be blank" mean in Shopify?
A setting in a section schema has an empty default, "default": "", and Shopify will not save the file. Delete the default line from that setting. Optional settings should have no default key at all, not an empty one.
Does the default can't be blank error only affect block settings?
No. In a test on 5 October 2026, empty defaults on section level text, textarea and url settings were all rejected with "Invalid schema", and an empty default on a block text setting was rejected with "Invalid block". A default of a single space was rejected too.
Why does Shopify show a different default can't be blank error after I fix one?
Shopify reports only the first blank default in each file per upload. A file with four blank defaults takes four uploads to clear one at a time. Search the theme for "default": "" and remove every match before uploading again.
Does shopify theme check find blank defaults?
No. shopify theme check returned zero offenses on a section with four blank defaults in our test with Shopify CLI 3.93.1. The rule is enforced by Shopify when the file is saved, so it first appears on theme push, ZIP upload or GitHub sync.
Will removing the default break my section?
No. A setting with no default starts empty, which is what the empty string meant. Liquid that checks the setting against blank behaves the same. Add real text as the default only if you want the field prefilled in the theme editor.
Generate a theme that looks like your brand
A complete Shopify 2.0 theme with conversion features built in, ready in minutes. No credit card required.
Generate my theme freeNo Shopify store yet? Start one here, then bring the theme. Themr may earn a commission if you start a paid plan; it does not change what you pay.