I'm using the Migration API to export a Prismic repository to another fresh Prismic repository. I followed this very clear tutorial from Prismic Team but I'm having some errors while creating a document that contains slices.
Here a screenshot of the first error : "The value must be a number"
Thank you for reporting this! I'm going to investigate what's happening and try to figure out what's happening here. Are you all getting the exact same issue as the one in @leo2's post, with the value must be a number (for number: 0) and the value must be a string (for an empty string), or are you running into different/general issues with the Migration API?
@ali you mentioned bookmarks in another forum post - is this something you're trying to migrate specifically and you're running into this issue?
Any little detail on what you're doing and what you want to be doing helps, so feel free to elaborate as much as you're able on what you've been dealing with Thanks everyone.
Hi @Ezekiel thanks for looking into this! Trying to add more details :
Error happens right after on "documents:updating" event from the reporter on a document that includes slices with empty strings or number 0 value.
Error happens with master locale & alternative locale
Error error happens even if I only create documents using master locale
I followed precisely the tutorials provided by Prismic team regarding Migration API
Documents creations & update works fine with all documents other than the ones with empty strings or number 0 in slices array
I really need to make this migration work. I have more than 200 documents to migrate so manual operations is not an option. For now this is the only blocking issue but while writing my migration script I ran into several other issues that I'd be happy to share after this is fixed. Do you have some kind of feedback program going on for the Beta feature? I'm also curious about why the previous import/export feature is already removed while the new Migration feature is still Beta?
Thanks for you @Ezekiel for this quick replay. Yes I discovered this problem when trying to do a repo migration . After a deep investigation, I had resolved the problem. It's related with creating a custom type to the new Prismic repo. The turnaround is to use the slice machine to update this custom type.
Similar custom types has been created without any problem with Migration API. I don't have any explanation.
I guess this problem can happen for other user.
The big challenge I get now is about updating Assets ids. When we use a little bit custom type, migration become not trivial.
I get many message errors around ; Assets with following ids not found error message.
We take your feedback on the migration API seriously and will do our best to act upon them.
We tried to reproduce the original issue of this thread (The value must be a string/number) that seems to occur with rich text fields but were not able to reproduce it with minimal setups unfortunately.
We're happy to help you investigate this issue further if you're able to provide more information about your setups (package versions used, code snippets, etc.).
A note regarding custom types creations (JSON defining the content shape of documents for Prismic), those are not handled by the migration API and should be created on the new repository prior to using the migration API through Slice Machine.
Hi @lihbr, thanks a lot for looking into this. I tried on my side to reproduce the issue with a minimal setup and it helped me figuring out that the error was on my side. I was parsing the data a certain way to setup the links to migration assets and documents relationships and something was wrong on ths side. When removing this parsing the error on the slice wasn't happening anymore. I hope this explanation can help anybody that encounters a similar issue. Thanks a lot for the assistance and sorry for blaming Prismic!!
However as I mentioned before I have some feedbacks to give about the migration API, is there a specific place to do it? Or should I create new topics for each?