-
Notifications
You must be signed in to change notification settings - Fork 16
Description
Problem
Sections can contain both .liquid and .json files. The .json files reference the .liquid files as a way to group them together. If a .json file is uploaded before the .liquid file is uploaded, a 422 Unprocessable Entity error is thrown.
Example
header-group.json and header.liquid are both stored in the /sections folder and are uploaded in this order.
The Cause
When uploading a theme, Syncify iterates through the files in alphabetical order (presumably). Because header-group.json is uploaded before header.liquid, the referenced section doesn't exist on the store.
If we were to run the upload argument again, it'll work, since the file is now present from the previous upload job.
Solution
Syncify should iterate through all the .liquid files first, then iterate through the .json files.