Skip to content
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

New valid JSON templates throw 422 Unprocessable Entity error #11

Open
eballeste opened this issue Aug 16, 2021 · 4 comments
Open

New valid JSON templates throw 422 Unprocessable Entity error #11

eballeste opened this issue Aug 16, 2021 · 4 comments

Comments

@eballeste
Copy link

eballeste commented Aug 16, 2021

Hi! I've been using this library for years now (thank you) and unfortunately, for some reason, cannot get it to work when trying to upload new Online Store 2.0 JSON template files. It always results in a 422 Unprocessable Entity error.

{
  "layout": "fall-winter-2021",
  "sections": {
    "main": {
      "type": "hero-big-headline"
    }
  },
  "order": [
    "main"
  ]
}

The layout file also exists, the section file hero-big-headline exists, and also saving the same code via the theme's code editor saves just fine. Is it because this lib is expecting these files to be liquid files? Any idea how to spit out the exact error that is causing the error to be triggered? Thanks for any help you might be able to offer.

@tmslnz
Copy link
Owner

tmslnz commented Aug 18, 2021

Not sure, sorry! It's been a while since I've done any theme dev.

422 Unprocessable Entity is Shopify's API response as-is, I would imagine the issue may be:

  • A problem in the file's schema
  • A liquid template with the same name as the .json file
  • anything else that's triggering Shopify's API to complain

Did you try uploading that file manually via their Theme editor to see if it works or if you get any clearer errors?

@eballeste
Copy link
Author

Gotcha, that's unfortunate, saving the json file directly via the theme's code editor throws no errors and I am able to edit and modify it's main sections + add my custom modular sections + reorder them around with no problems.

I'm thinking after so many years using this dev workflow, the time has come to stop using it and adopt Shopify's new git CLI for dev environments / deployment.

@tmslnz
Copy link
Owner

tmslnz commented Aug 19, 2021 via email

@eballeste
Copy link
Author

i was pretty excited when they announced it during their Unite conference recently.

Updates to dev workflow was just one of many exciting things that are now available including sections in all pages including product pages, not just the homepage.

https://shopify.dev/themes/tools/cli

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants