I have been using slices without fields, creating and pushing them via Slicemachine. Just today, I have noticed that it is not possible to save pages with such slices on Prismic anymore. Not only that, even if I add a field with a default value, I can't save it when it's added, I specifically have to type in something. Tried adding a boolean type field and same issue arises again - I have to move the boolean switch in order to be able to save.
An example slice (with a "fake" field, just to make it work):
Error, that I get from Prismic, after trying to save page with a slice that has empty fields or no fields:
Response:
Have there been any recent updates or changes that may have caused this behaviour? I work on quite a big project, that has been using empty slices (as placeholders for displaying hardcoded or fetched data) for a long time and we had no such issues before.
I also see this issue. I had a slice that did not have any fields previously save/publish fine. But some time in the past month, the field cannot be added to a custom type without returning an error when saving:
400: List(JsError(List((/key/value,List(ValidationError(error.expected.jsstring,WrappedArray()))))))
Following up, adding a field to that slice, the page still can't be saved until that field is interacted with.
Hello everyone, I'm having this message "Error while saving your change - Click to retry" when I try to save a document. It only happens when one particular slice is called. This slice is empty, there is no primary or repeatable value attached to it. All the content of the slice is managed in my frontend.
When I try to save, the prismic API sends back a 400 error with this body :
Unable to save version:
List(JsError(List((/key/value,List(ValidationError(error.expected.jsstring,WrappedArray())))))).
What is weird is that I use the same exact slice in other pages and it used to work perfectly. It still is displaying the slice for the old pages, but I can't create a new one with this slice. Maybe the issue is on your side ? Let me know please !
Hello @alexandreguedj@ianboyte, This is a known behavior, and I have already raised this question to my Slice Machine team. I haven't heard back from them yet. I will;l come back to you once I hear from them.
Can you please confirm the version of the slice-machine-ui?