Persistent UID in page data even after removing the UID field from Page type

Describe your question/issue in detail

When I was starting out my project I used UID field to play around and later, I removed it.
Unfortunately it stays in the fetched page data for some reason. I need to get rid of it from single page types as it interferes with my dynamic sitemap generation.

How can I make sure that UID is gone from the page data? For master locale AND for alternate languages? I have no use for it but it stops me from doing certain things with my code.

Example on 'home_page', the UID field does not exist on this type in my model as I'm not using it for anything.

{
  id: 'ZYGaGBEAAAIh5ecg',
  uid: 'home',
  url: '/',
  type: 'home_page',
  href: 'https://sia-next.cdn.prismic.io/api/v2/documents/search?ref=ZjTaeRIAACQAzI8D&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22ZYGaGBEAAAIh5ecg%22%29+%5D%5D',
  tags: [],
  first_publication_date: '2023-12-19T13:26:55+0000',
  last_publication_date: '2024-05-03T12:35:53+0000',
  slugs: [],
  linked_documents: [],
  lang: 'en-gb',
  alternate_languages: [
    {
      id: 'ZZaWCREAAG8AnbjM',
      type: 'home_page',
      lang: 'de-de',
      uid: 'home-de'
    },
    {
      id: 'ZZaV9hEAAFMAnbip',
      type: 'home_page',
      lang: 'fr-fr',
      uid: 'home-fr'
    },
    {
      id: 'ZZaVzBEAAFMAnbg3',
      type: 'home_page',
      lang: 'es-es',
      uid: 'home-es'
    },
    {
      id: 'ZZ6xBBEAADoiT_TN',
      type: 'home_page',
      lang: 'en-us',
      uid: 'home-us'
    }
  ],

What steps have you taken to resolve this issue already?

Republishing the pages, making sure it doesn't exist in the models etc.

Your Role

Developer

Steps to reproduce

  1. Create Single page type.
  2. Add UID field in slice machine to that page type.
  3. Put something in that field via Page Builder. For example 'home-alternate' and publish the page.
  4. Remove the field in Slice Machine.
  5. The field is gone in page builder, republish the page.
  6. Try to fetch the page and see it's properties for example via console.log
  7. UID will still be there while it should not.

Hi @dmakos , thanks for reporting the issue. I'm following up with the team and will let you know when we have a fix for this.

Best,
Guy

1 Like

Hi, any update on this one please? Thanks

Hi @dmakos , not at this stage. We had some other tasks that were a higher priority. I should have an update for you in the next couple of days.

Best,
Guy