-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: theme check ValidJSON incorrectly reports error on number setting placeholder #4933
Comments
Per docs, the placeholder is a placeholder value for the input. I'm not sure a string should be accepted. I think this is working as intended? |
Actually, only the "default" value must be expressed as number, the docs don't indicate the type of the "placeholder" value in the schema, and shopify only allows type string, so theme check shouldn't return this error. |
I'll verify internally because the docs say:
Which seem to say it should be a value, but the language is confusing. If the backend throws an error and you are in a deadlock this isn't good. We should probably update the docs as well if that's the case. |
Thanks, |
Should be fixed now. The docs/json schemas are pulled independently from the CLI/vscode extension version so you don't need to wait for a new release. |
it works now. |
Thanks for reporting :) |
Please confirm that you have:
In which of these areas are you experiencing a problem?
Theme
Expected behavior
There shouldn't be an issue on this schema fragment:
{ "type": "number", "id": "free_shipping_threshold", "label": "Threshold", "default": 50, "placeholder": "ex: 50", "info": "Leave the field empty (value 0) to disable the Free shipping progress bar." },
Actual behavior
When running
shopify theme check
I get an error of typeValidJSON
, messageIncorrect type. Expected "number"
for the placeholder field of a setting of type "number".The vscode extension also reports the same issue.
If I change the placeholder from
"ex: 50"
to just50
the error goes away, however I can't upload that to shopify because it returns an error indicating that placeholder must be a string.Verbose output
Reproduction steps
Operating System
Windows 11
Shopify CLI version (check your project's
package.json
if you're not sure)3.70
Shell
No response
Node version (run
node -v
if you're not sure)v20.17
What language and version are you using in your application?
No response
The text was updated successfully, but these errors were encountered: