Legacy Slices to Slice Machine

Hello Prismic Community,

I've recently transitioned my custom types to page types and started using the new Slice Machine for a more streamlined content management process. However, I've encountered a significant hurdle. None of my existing slices are functioning, and I'm met with an error message indicating that these slices were created with the Legacy Builder and are thus incompatible with Slice Machine. The exact message states:

"This Slice was created with the Legacy Builder, and is incompatible with Slice Machine. You cannot edit, push, or delete it in Slice Machine. In order to proceed, manually remove the Slice from your type model. Then create a new Slice with the same fields using Slice Machine."

I understand that I need to recreate these slices using Slice Machine, but I'm concerned about potential data loss and the extensive manual effort required to replace each slice in existing content documents.

Has anyone faced a similar issue during their migration process? I would greatly appreciate any guidance, best practices, or tips on how to efficiently manage this transition without disrupting the current setup too much. Moreover, any advice on preventing data loss and ensuring a smooth migration of content to the new slices would be invaluable.

Thank you in advance for your assistance!

Hey @chawder.ahrtyn,

We recently announced an upgrader tool to convert legacy slices to slice machine-compatible slices:

In the blog post, you'll see a link to join the waitlist.

Sam

Hey Sam,

Thank you for your prompt response and for pointing me towards the upgrader tool. I've gone through the tutorial and attempted to use the tool to convert my custom types to page types, in line with the migration to Slice Machine. However, I've encountered an issue where the "Migrate Slice" button, as shown in the tutorial, doesn't appear for my slices. This has left me unable to proceed with the migration as outlined.

It might be worth noting that this project was initially built with Gatsby, but I'm currently in the process of rebuilding it with Next.js 14. I'm not sure if this transition has any implications on the migration process or the visibility of the "Migrate Slice" button, but I wanted to provide full context.

Given that I've followed the steps in the tutorial but am facing this hiccup, could there be any additional considerations or steps that I need to be aware of, especially in the context of moving from Gatsby to Next.js 14? Any guidance or alternative solutions would be greatly appreciated.

Thanks again for your help,
/ CHawder Ahrtyn

@samlittlefair

Hi,

It seems you didn't activate the Legacy Slice Upgrader in Slice Machine, to activate it, go to http://localhost:9999/labs.

Let us know if it resolves your problem.

Thank you,
Xavier

1 Like

Hello @xavier.rutayisire,

After activating the Legacy Slice Upgrader, I was able to migrate my slices without any problems.

Thank you so much for the help!

Bestregards,
/ Chawder Ahrtyn

I wasn't aware of the /labs endpoint and we have attempted to convert all of our legacy slices manually (as suggested by the tooltip when hovering a legacy slice. We're now trying to query our data in a staging environment using the converted slice models, but seems like the data is in the wrong shape. Is there any documentation around what a legacy slice model should look like when it has been converted to Slice Machine world?

I've just done a test with the migration tool after turning it on (at /labs) and I can see a legacyPaths key that looks like it might be something important I'm missing.

1 Like

Hi David,

Nice to talk to you again!
The legacyPaths key is created by the Upgrade tool, it allows our PageBuilder to be aware what was the legacy slice ID of a slice that has been migrated so that the PageBuilder can port the content from legacy slice to the migrated slice.

Thanks
Alex