422 Unprocessable Entity Error when uploading a theme

Hey Everyone :wave:

Hope you are all well!

I am uploading a theme where I have made marginal changes to the template logic. I have also made some style changes.

I downloaded the casper theme from my server and then edited it, followed the guide on using yarn zip to run gulp. I have also used the yarn test command to validate, there were no errors.

Output from yarn test

Checking theme compatibility...

✓ Your theme is compatible with Ghost 3.x

Recommendations
---------------
- Recommendation: The output of {{id}} changed in Ghost v1.0.0, you may need to use {{comment_id}} instead.
Files: post.hbs

I am getting the following error back when uploading the theme:

1. {message: "Failed to read zip file", context: "dev.zip", type: "ValidationError",…}

  1. code: null
  2. context: "dev.zip"
  3. details: "EACCES: permission denied, mkdir '/tmp/4d8b9927-175f-413b-a432-17619489990a/assets/built/'"
  4. help: "Your zip file might be corrupted, try unzipping and zipping again."
  5. id: "22dd3ce0-bb9f-11ea-8882-7f108c728b8c"
  6. message: "Failed to read zip file"
  7. property: null
  8. type: "ValidationError"

And the form data in the request is as follows:

------WebKitFormBoundaryrjL6eftelraznaFZ
Content-Disposition: form-data; name="file"; filename="dev.zip"
Content-Type: application/x-zip-compressed


------WebKitFormBoundaryrjL6eftelraznaFZ--

Are you on Windows using gulp-zip < 5.0.2, if so, upgrading gulp-zip might fix it.

Else, how did you install Ghost?

2 Likes

Hey Hannah, thanks for the reply.

It appears you were right about the version number :grin: .I have upgraded it and seems to work fine. Thank you for your help!

1 Like