URGENT - Problem importing slice with import Bulk update feature


I'm having this error and i can't figure it out.

It has the exact same format than the original export.

can you help me please ?

Thanks :pray: :blush:

1 Like

Hi @virginie.lalande,

Thanks for reaching out.

I will try to reproduce and investigate this. Can you please share with me your repository name and the file you are trying to import?

Looking forward to your reply,

I think it's impossible to update the body, adding new slices :confused:

the repo https://test-dougs.prismic.io/
and the file
YpjaOBEAAC4A_9i5$24d329bf-8498-4f19-b823-7e997d9cfc0f.json.zip (3.3 KB)

1 Like

Hi @virginie.lalande ,

I've been able to reproduce the issue on my side, and even tired to remove the key value but it still gives the same issue.

And I don't know what can cause this issue, and so I will create an issue for this in our tracker to have somebody from our dev to investigate and I will let you know in case of any updates.

I just ran into the exact same issue.

Not sure if it has anything to do with our repo using slices made/pushed via slice machine.

I think this is an issue with the importer not being able to lookup the key which belongs to a slice machine slice.

I got around this issue by using the uuid npm module to generate a uuidv4 string and appended "$" and the uuidv4 string to the end of the key. In my case rich_text failed to import with the same error @virginie.lalande had. Replacing "key": "rich_text" with a new uuidv4 like so: "key": "rich_text$e6f8395f-e742-441e-838f-fc3b2fcf1ce7" worked!

Im assuming if there's a ${uuidv4-value-here} in the key, the importer doesnt try to lookup the actual slice and just saves the imported data as is.

I'll also leave the actual error here so that others googling this issue might find this workaround quicker:

Prismic Importer error:

Slice Content key not valid: /key

1 Like

Hi @TheBoroer
Thanks for sharing this workaround; meanwhile, we have already created an issue in our tracker to fix the issue.

We have a problem with importing documents from a JSON file. We generated a large number of files and uploaded them in batches, everything was ok, and suddenly one day the import stopped working and displays errors, with the same files working a few hours before.

The error says that the key is missing in the slice, but the key is set in each slice.


Example file:
dhl-oddzialy-kalety.json.zip (1.7 KB)

Hi @it-ak
Thanks for reaching out.
Can you please send us (in a private message if necessary) your repository name to try to reproduce this issue?

Hi @it-ak

In this, this thread, someone else has reported the same issue, and there is a workaround in that thread.

We have also created an issue in our tracker to fix this issue.

Note that I will merge both threads to make tracking the info more accessible.

We have done a fix for this issue, and it has been deployed for a selection of users that reported the problem before it will be deployed for everyone.
Please let us know if you would like to get an early release.

Hi @Fares,

We are also having this issue in the adahealth repository and we are currently working on a new batch of imports, getting early access to this fix would be of great help.

Thank you.

1 Like

Yes, sure I have requested the activation for your repository.

I have activated it for you @guillem.andreu

1 Like

We have the same problem for importing (having the error on the key property)
Account: EdApp

Hi @mathieu6700417
Is it edapp.prismic.io your repository name?

Hi @Fares , I used the workaround to add the $UUID manually, a couple of weeks age when the issue was still persistant. at that point I was able to import the documents but somehow the script to generate the json with slice array repeated the same UUID in each document for all the rich text fields and now for those documents I am only able to see the last text field in editor... the content is still there as it is loaded on the FE but in prismic editor it shows only the content of the last text field. any suggestions to recover from this?

Hi @amogh.kajaria

Thanks for reaching out.

As mentioned above there is a fix implemented for this that we can give you access to as an early release, would that be beneficial or do you need to solve the side effect of the workaround?

Hey @Fares ,
It was about 135 out of 800+ documents that have this issue, it would be great if we can fix a fix for these documents, because deleting them all and reimporting would be a bigger hassle especially to delete all the media one by one

Well, I don't understand how did the import work for you, the error is blocking meaning you would not be able to proceed with it if you don't have that error!