Currently if I create a custom document type and add a slice zone that uses shared slices, it fails to save when I create a document from that type. Seems to only fail when using shared slices. It saves successfully if I only use OOB slices. Any ideas on what is going on here?
I have narrowed this down to just two of the shared slices causing it to not save, but I cannot figure out what is wrong with those two and the lack of any helpful messaging is not great.
Hey Shawn,
Can you give me more details on what was causing the error?
Thanks.
Hello, I have same issue, slices created with SM. After adding them to page I can't save it.
In SM and Storybook slice renders without errors.
big thanks in advance.
Well, that is the problem, I don't know what is causing the error. Glad to see someone else is at least experiencing the same thing below though. I will you an overview of what I am experiencing. This is on my repo slicemachinetest.prismic.io and the two shared slices that seem to be breaking things are the TaskButtons and ContentQuicklinks slices.
I created 6 custom slices in SM, all following the same process. Create slice, build the model out in Slice Machine (push to file system), finish up the design with markup and css, and then push to prismic. (I'm assuming the push to prismic only pushes the model and screenshot.). I then added my shared slices to my page template so they would be available in the slice zone. That saves just fine. But when I go to the page document and make a change, it won't save now. I'm not even using the slices in the document, but just because they are available in the slice zone, I get an error when trying to save. If I remove those two slices from the template/type, my document will save again. It is like those two shared slices got corrupted somehow, but with no error message other than the one saying it couldn't save, I have no insight into what is wrong with it. Hope this helps to identify where this issue is coming from.
Adding to this after few tries to save unsuccessfully my prismic repo crashed. I lost all my custom types.
After clicking custom type Prismic suggest to create new type. After creating new type all my custom types reverted to normal.
Some new information
I added same slice which breaks ppc type to page type and it works as expected.
This is really confusing.
Is this same behaviour at your side @arcaneshawn ?
@juskeviciusarn. Sort of, but it is not consistent. I added one of the offending slices to a different/already existing custom type and created a new document off of it and it saved. Then I added the other offending slice to that template and the document would not save and I was not able to save a new document off it. I then created another new custom type with both to see if the first document made off of that type would save, and it failed. Actually thought that would save.
Tried it with the other slice on a new type and document and it worked as well. So it seems that if I create a new type and doc with only one of those slices in the slice zone, it works. But if I add the other slice to the type the doc will not save and if I create a new type and doc with both in the slice zone from the start the doc will not save.
Another test...created a new type with one of the offending slices configured from the start. Created a new document off of that type and it saved. Added another shared slice to type (not the other offending one, one that has been working) and tried to create a another new document off of that and it failed.
I was evaluating this product for use in a project at my company, so I'm doing this POC to make sure it is the right solution before my company goes spending money on it. I'm starting to think this SM product is just not ready for prime time. I'm seeing a lot of bugs in prismic when SM is enabled on a repo. This doesn't rule out the use of prismic fully, but I don't think I can bring bring prismic with SM enabled to table with what I'm seeing here. Disappointing because I love what they are doing here, it just seems to need some more time in the oven.
Hey Shawn and Arnas,
Sorry I wasn't clear above, I meant which slices were causing the error, which you then provided anyway so that's cool. Thank you for this detailed feedback I'm going to test this on my side with the cases you described.
The team and I will then look in to this and get back to you once we've had a chance to check it ourselves.
It's true though Slicemachine is in beta, but we have a team actively working on it everyday to fix issues and make improvements.
Thanks.
Hey guys,
Could you give me more details?
Like a model of a broken Shared Slice, any procedure to get the same issue so I can investigate it.
About the 413 I'm not sure, it's a payload too large, I would need to have a look on this specific document.
Thanks.
Also @arcaneshawn can you give us the URL of your repo again because slicemachinetest.prismic.io, seems to belong to someone in our team.
@alws @Phil thanks for fast response!
@alws should I post slices models and repo name with page here or dm you?
As you wish.
That'll help a lot even though I'm onto the most probable cause and putting it in QA right now for testing.
Keep you posted
My bad, mine is sliceymachinetest.prismic.io. Added a 'y' to 'slice'.
Here is the model for one of the slices and it should be noted that I am also getting 413 error...so mine is likely the same issue as the other guy.
{
"id": "content_quicklinks",
"type": "SharedSlice",
"name": "ContentQuicklinks",
"description": "ContentQuicklinks",
"variations": [
{
"id": "default-slice",
"name": "Default slice",
"docURL": "...",
"version": "sktwi1xtmkfgx8626",
"description": "ContentQuicklinks",
"primary": {
"title": {
"config": {
"label": "Title",
"placeholder": "Title text...",
"allowTargetBlank": true,
"single": "heading2,heading3,heading4,heading5,heading6"
},
"type": "StructuredText"
},
"description": {
"config": {
"label": "Description",
"placeholder": "Highlight text...",
"allowTargetBlank": true,
"single": "paragraph"
},
"type": "StructuredText"
},
"body": {
"config": {
"label": "Body",
"placeholder": "Body text...",
"allowTargetBlank": true,
"multi": "paragraph,preformatted,heading3,heading4,heading5,heading6,rtl"
},
"type": "StructuredText"
},
"cta": {
"config": {
"label": "Button link",
"placeholder": "Button link...",
"allowTargetBlank": true
},
"type": "Link"
},
"ctaText": {
"config": {
"label": "Button Text",
"placeholder": "Button text...",
"allowTargetBlank": true,
"single": "paragraph"
},
"type": "StructuredText"
},
"postcta": {
"config": {
"label": "Post Cta Content",
"placeholder": "Post Cta Content...",
"allowTargetBlank": true,
"multi": "paragraph"
},
"type": "StructuredText"
},
"image": {
"config": {
"label": "Image",
"constraint": {},
"thumbnails":
},
"type": "Image"
},
"isAlignedLeft": {
"config": {
"label": "Align Image",
"placeholder": "Align image...",
"placeholder_false": "Right",
"placeholder_true": "Left",
"default_value": true
},
"type": "Boolean"
}
},
"items": {
"quicklink": {
"config": {
"label": "Quick Link",
"placeholder": "Quick link...",
"allowTargetBlank": true
},
"type": "Link"
},
"quicklinktext": {
"config": {
"label": "Quick Link Text",
"placeholder": "Quick link text...",
"allowTargetBlank": true,
"single": "paragraph"
},
"type": "StructuredText"
}
}
}
]
}
I found the issue, seems good, running some more tests and we're gonna be good to go.
I'll deploy the fix on production tomorrow first thing in the morning.
Awesome, thanks for the quick attention. Anything required on the consumer end when the fix is in place?