Migration API Error - Slice renaming - solved

Hi Just a note that if you get an error whilst migrating a page that has a slce type that isn't compatible with the latets slice machine ie: from legacy slices: '6_column_table' to slice Machines Pascal 'SixColumnTable / 'six_column_table'' you need to change the slice_id's prefix as well as the slice_type when mapping across - I used this -

`if (slice.slice_type === '6_column_table') {
        base.slice_type = 'six_column_table'
        const uuidPart = slice.id?.split('$')[1] || prismic.generateUID();
        base.id = `six_column_table$${uuidPart}`;
    }

@PrismicTeam If we could add this into the error logging as well sometime thanks R

1 Like

good catch @rob1 !! :raising_hands:

Appreciate you sharing it!