Failed to upload theme

I just setup up Ghost on an ubuntu server on AWS EC2.

I’ve just tried uploading my own theme( passes gscan ) but I get an error

“Unexpected field”

14

And this error message in console

{
  "errors": [
    {
      "message": "Resource not found",
      "context": null,
      "type": "NotFoundError",
      "details": null,
      "property": null,
      "help": null,
      "code": null,
      "id": "cfa5e280-3a84-11e9-841d-4f3bbe0eacd0"
    }
  ]
}

Ghost Log

[2019-02-27 11:49:05] ERROR "POST /ghost/api/v2/admin/themes/upload/" 500 44ms

NAME: InternalServerError
CODE: LIMIT_UNEXPECTED_FILE
MESSAGE: Unexpected field

level: normal

InternalServerError: Unexpected field
    at new GhostError (/var/www/ghost/versions/2.16.1/core/server/lib/common/errors.js:10:26)
    at _private.prepareError (/var/www/ghost/versions/2.16.1/core/server/web/shared/middlewares/error-handler.js:43:19)
    at Layer.handle_error (/var/www/ghost/versions/2.16.1/node_modules/express/lib/router/layer.js:71:5)
    at trim_prefix (/var/www/ghost/versions/2.16.1/node_modules/express/lib/router/index.js:315:13)
    at /var/www/ghost/versions/2.16.1/node_modules/express/lib/router/index.js:284:7
    at Function.process_params (/var/www/ghost/versions/2.16.1/node_modules/express/lib/router/index.js:335:12)
    at next (/var/www/ghost/versions/2.16.1/node_modules/express/lib/router/index.js:275:10)
    at Layer.handle_error (/var/www/ghost/versions/2.16.1/node_modules/express/lib/router/layer.js:67:12)
    at trim_prefix (/var/www/ghost/versions/2.16.1/node_modules/express/lib/router/index.js:315:13)
    at /var/www/ghost/versions/2.16.1/node_modules/express/lib/router/index.js:284:7
    at Function.process_params (/var/www/ghost/versions/2.16.1/node_modules/express/lib/router/index.js:335:12)
    at next (/var/www/ghost/versions/2.16.1/node_modules/express/lib/router/index.js:275:10)
    at /var/www/ghost/versions/2.16.1/node_modules/express/lib/router/index.js:635:15
    at next (/var/www/ghost/versions/2.16.1/node_modules/express/lib/router/index.js:260:14)
    at next (/var/www/ghost/versions/2.16.1/node_modules/express/lib/router/route.js:127:14)
    at Layer.handle_error (/var/www/ghost/versions/2.16.1/node_modules/express/lib/router/layer.js:67:12)

MulterError: Unexpected field
    at wrappedFileFilter (/var/www/ghost/versions/2.16.1/node_modules/multer/index.js:40:19)
    at Busboy.<anonymous> (/var/www/ghost/versions/2.16.1/node_modules/multer/lib/make-middleware.js:114:7)
    at emitMany (events.js:147:13)
    at Busboy.emit (events.js:224:7)
    at Busboy.emit (/var/www/ghost/versions/2.16.1/node_modules/busboy/lib/main.js:38:33)
    at PartStream.<anonymous> (/var/www/ghost/versions/2.16.1/node_modules/busboy/lib/types/multipart.js:213:13)
    at emitOne (events.js:116:13)
    at PartStream.emit (events.js:211:7)
    at HeaderParser.<anonymous> (/var/www/ghost/versions/2.16.1/node_modules/dicer/lib/Dicer.js:51:16)
    at emitOne (events.js:116:13)
    at HeaderParser.emit (events.js:211:7)
    at HeaderParser._finish (/var/www/ghost/versions/2.16.1/node_modules/dicer/lib/HeaderParser.js:68:8)
    at SBMH.<anonymous> (/var/www/ghost/versions/2.16.1/node_modules/dicer/lib/HeaderParser.js:40:12)
    at emitMany (events.js:147:13)
    at SBMH.emit (events.js:224:7)
    at SBMH._sbmh_feed (/var/www/ghost/versions/2.16.1/node_modules/streamsearch/lib/sbmh.js:159:14)

Ghost-CLI version: 1.9.9
Ghost version: 2.16.1 (at /var/www/ghost)

Hope you can help

This was fixed in 2.16.2.

That was it! Thanks Kate!

1 Like