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.

Hey Philip,

The team is working on this at the moment, I'll let you know once I have more info on this. Sorry again for this inconvenience.

Hi Team,

So a fix for this is currently in review.

@omgtam.vu For your tvworld-client repository. The problem is coming from the "Black Hoodie 2" document. If you save another version of that document (it can be with a non-visible change) and republish it then it should resolve the issue for now. Although this is just a workaround, the fix should stop this happening again.

@philip Unfortunately we don't have a workaround for you repo as of yet, but like I said the fix is in review and hopefully we'll get it released for you soon.

Thank you for your patience.

Hi Phil,

Any news?

Br,
The still blocked Phil :stuck_out_tongue:

Hey Phil,

Still waiting on the fix to be reviewed. Sorry for the wait.

The apologetic Phil.

I've taken up a new hobby while waiting: ramen :ramen:. It takes SO long time to make it, so makes the waiting time less painful. Tried shoyu ramen, now trying miso ramen - maybe this issue will be solved before I'm done perfecting my ramen skills? :partying_face:

The team has reviewed the fix and it's due to be tested today or tomorrow. Not as nice as ramen, but good news all the same.

Hi Phil,
We have validated internally the fix. We are planning to deploy it by the end of next week.

Regards,
François

Great! Thanks :slight_smile:

Hey Phil,

I think this should be deployed now. Can you test to confirm.

Thanks,
Phil.