Thanks for the work on the migration API. I think it will be great. The higher limit is very useful as it was tedious to upload each zip file every time. I also think it will become more automated now.
I am using a demo key. I am trying to take the objects from the JSON files and add them to the new repo. I have only tried to get one document for now. If you could let me know where I have gone wrong that would be great, I am getting the error: [ { property: 'title', error: 'The value must be a string' } ]
There is no title on the new or old repo. There is no title in the json files.
This is an unclear error message that we could / should improve.
For each document creation we require you to have a title field outside of your data.
{
"title" : "My Display Name", // The display Name of your doc
"uid": "example-uid3", // New document UID
"type": "blog", // A type that exists in your repository
"lang": "en-us", // A locale that exists in your repository
"data": {...} // The data based on your custom types
}
This title field is being used to provide a display name for your document in Prismic.
By adding this title field at the root of the JSON you should fix this issue.
Thanks for the reply. I will try it. It makes sense now.
Is it advised that I should always have a "title" outside of my data from now on? I am sure I used to set it to the same as the SEO title. Do I need to set it explicitly now?
I think it might be potentially confusing for content managers to have two titles that are abstracted from the normal content at least in the way I have it currently set up.
I used the uid for the title, but I have a new error! I am sure the old custom type UI created the heading JSON, not myself.
{
property: 'data.body.0.items.0.heading.0.type',
value: 'heading2',
error: "The block type 'heading2' is not allowed in your document type. Enable the type for this rich text field to create the document."
},