Validation error in console when saving document

I have a rather complex data type for constructing landing pages.

When I save a document I get an error "Error while saving your changes - Click to retry". This seems to be the result of a backend validation error, but this is not shown anywhere in the interface:

Unable to save version:
List(JsError(List((/key/value(0)/type/data/edit/zoom,List(ValidationError(error.expected.jsnumber,WrappedArray()), ValidationError(error.expected.jsnumber,WrappedArray()), ValidationError(error.expected.jsnumber,WrappedArray()), ValidationError(error.expected.jsnumber,WrappedArray()), ValidationError(error.expected.jsnumber,WrappedArray()))), (/key/value(0)/type/data/height,List(ValidationError(error.expected.jsnumber,WrappedArray()), ValidationError(error.expected.jsnumber,WrappedArray()), ValidationError(error.expected.jsnumber,WrappedArray()), ValidationError(error.expected.jsnumber,WrappedArray()), ValidationError(error.expected.jsnumber,WrappedArray()))), (/key/value(0)/type/data/edit/crop/y,List(ValidationError(error.expected.jsnumber,WrappedArray()), ValidationError(error.expected.jsnumber,WrappedArray()), ValidationError(error.expected.jsnumber,WrappedArray()), ValidationError(error.expected.jsnumber,WrappedArray()), ValidationError(error.expected.jsnumber,WrappedArray()))), (/key/value(0)/type/data/edit/crop/x,List(ValidationError(error.expected.jsnumber,WrappedArray()), ValidationError(error.expected.jsnumber,WrappedArray()), ValidationError(error.expected.jsnumber,WrappedArray()), ValidationError(error.expected.jsnumber,WrappedArray()), ValidationError(error.expected.jsnumber,WrappedArray()))), (/key/value(0)/type/data/width,List(ValidationError(error.expected.jsnumber,WrappedArray()), ValidationError(error.expected.jsnumber,WrappedArray()), ValidationError(error.expected.jsnumber,WrappedArray()), ValidationError(error.expected.jsnumber,WrappedArray()), ValidationError(error.expected.jsnumber,WrappedArray()))))))

I suspect this is related to the images in the various fields, but I don't know for sure.

This is essentially breaking my Prismic experience as there is no way I can let our content people deal with this experience.

I noticed that I was missing dimensions on some images in the data type. I added those, but that didn't fix anything.

Hi Philip,

Welcome to the community!

I've seen a similar issue to this today. So I think this is a bug. I'll try and figure this out with the team.

Can you give me:

  1. The name of URL of your repository.
  2. The custom type of the document.
  3. The UID of the document.

Thanks.

Phil,

Sure.

  1. billy-dk.prismic.io
  2. Custom type is "landing_page"

I don't have a UID as I couldn't even save the document, but I have some steps to reproduce:

  1. Make a new document of type "landing_page"
  2. Add a "Variable columns" slice
  3. In the "content" field of the validation zone insert any image from the media library
  4. Save

Actual result: "Error while saving your document - please try again".
Console says:
Unable to save version:
List(JsError(List((/key/value(0)/type/data/edit/crop/x,List(ValidationError(error.expected.jsnumber,WrappedArray()))), (/key/value(0)/type/data/height,List(ValidationError(error.expected.jsnumber,WrappedArray()))), (/key/value(0)/type/data/width,List(ValidationError(error.expected.jsnumber,WrappedArray()))), (/key/value(0)/type/data/edit/crop/y,List(ValidationError(error.expected.jsnumber,WrappedArray()))), (/key/value(0)/type/data/edit/zoom,List(ValidationError(error.expected.jsnumber,WrappedArray()))))))

Title says it all! Prismic's dashboard reflects any recent changes made to the repo, however when I attempt to view these changes from Prismic's API browser it appears as if I'm viewing an earlier version? I am still getting acquainted with this platform however if I didn't know any better it seems as if I'm querying a cached version of the master repo. Any help would be greatly appreciated!

Hello Tam,

Welcome to the community! I'll be happy to help.

Are you remembering to click 'Publish' after you click 'Save'? This might not be clear the first few times.

Also, when you visit the API Browser, are you provided the ref in the URL? or are you letting it be generated automatically by the API browser?

Thanks.

Hi Phil,

Thanks for the prompt response. Yes, I am hitting 'publish' after saving. When I visit the API Browser dashboard only a single, master ref is provided in the associated dropdown. This value does not change when I make a GET request from Insomnia as outlined here:

Hey Tam,

Can you tell me the name of your repo, the document you are updating and the content you're expecting to see?

Thanks.

Hi Phil,

The repo name is 'tvworld-client'. Attached are photos of the document I am updating and the associated content in the API browser — the 'Size Guide' field is not present in the API response.


OK, I had a look and it's strange that the field is coming up as a link field:

"size_guide": {
"link_type": "Document"
}

and not an image field like below:

"size_guide": {
"link_type": "Document"
}

Also none of your repeatable types have a UID field, which is necessary for repeatables.

There seems to be some other strange issues. I'm investigating it with the team.

@omgtam.vu I've moved this here because I believe it's related. I'm investigating with the team.

Phil,
Any news on this? We're still stuck.