Import Content fails in Ghost 5.26 - Docker

Hello there. I’m creating a new instance of Ghost with docker-compose in my machine, the idea is to import contents from a older blog to this one.

However, when I try it, the notification on my email says the import was unsuccessful.
When I look into the https___ghost_fission_codes_production.error.log
This is what I see:

{"0":{"statusCode":422,"errorType":"ValidationError","level":"normal","message":"ValidationError: Validation (isEmpty) failed for unsplash\nValidationError: Validation (isIn) failed for unsplash","id":"62131cd1-9d8e-11ed-b1a0-b5ee3bff3a00",
"name":"Log","hostname":"b6c0405b7c86","pid":1,"level":50,"msg":"Content import was unsuccessful","time":"2023-01-26T15:30:43.318Z","v":0}

The NGINX client_max_body_size is set to 100MB and my JSON file has 7.7 MB. I was searching in other topics and looks like the problem is with this unplash, is this the same case?

Thanks a lot

Are you able to share your JSON file? It seems like there’s something off about its formatting that’s causing this error.

1 Like

I think I could send part of it, without the text part that would include some content, names, emails, do you think the posts part could be the problem?

Yeah, even if you could just share it’s properties (not the data), that would be helpful.

You can see what the general format of the data should be here, too:

So, would be something like this (it’s not parsed, unfortunately cause there are millions of lines):


The ones with [{...}] contain multiple fields and I didn’t want to write all of them. After posts we also have “post_meta”, “post_authors”, “post_tags”,“roles”,“settings”.
Maybe I’ll try a new export and see what happens.

Your file format doesn’t seem like it’s matching the one specified in the migration doc.

Please try pruning it so that it matches this format:

        // epoch time in milliseconds
        "exported_on":  1388805572000,
        "version":      "2.14.0"
        "posts": [
        "tags": [
        "posts_tags": [
        "users": [
        // Provide this if you want different roles to the default "Author" role
        "roles_users": [
1 Like

I’ve managed to split the file in two, and fixed the encoding/spacing problems, after that the import worked fine.

1 Like