Client experiencing issues with updating content in Sanity, potential solution found.

12 replies
Last updated: Aug 26, 2022
Hey everyone! Look for a bit of insight / assistance. Basically we have a client that is having trouble adding / updating content: Sanity keeps giving this message:
waiting for tasks to finish before publishing, then Says desk tool has crashed
I have attached the Sanity Version we are running for them. This has started to happen quite a bit on the latest version, I have noticed the Desk tool crashing on a few projects running the latest Sanity. I have looked for a way to downgrade but have not found a way that works anymore.
Jun 28, 2022, 4:37 PM
no help or insight, but i've been noticing the same thing since about 2.29 i'd say.

user A
user M
is there anything the sanity team is aware of on this?
Jun 29, 2022, 11:31 AM
Thanks
user G
At least Iโ€™m not alone ๐Ÿ˜„ - I would say you are correct on your versions, It only started happening after updating to 2.29 and now still on 2.30
Jun 29, 2022, 11:33 AM
Hey
user D
! What does the schema for one of these documents look like?
Jun 29, 2022, 4:29 PM
Hi
user M
Thanks for reaching out ๐Ÿ™‚. Please see below (Seems to be an issue with any document):

export default {
  name: 'country',
  title: 'Country',
  type: 'document',
  preview: {
    select: {
      title: '<http://title.de|title.de>',
      media: 'countryImage',
    }
  },
  fields: [
    {
      name: 'countryLandingMetadata',
      type: 'pageMetadata',
      title: 'Country Landing Metadata',
      fieldset: 'countryLanding'
    },
    {
      name: 'countryLandingSocialMetadata',
      type: 'pageMetadataSocial',
      title: 'Country Landing Social Metadata',
      fieldset: 'countryLanding'
    },       
    {
      name: 'title',
      title: 'Title',
      type: 'localeString',
      fieldset: 'countryLanding',
    },
    {
      name: 'subTitle',
      title: 'Sub-title',
      type: 'localeBlock',
      fieldset: 'countryLanding',
    },
    {
      name: 'slug',
      title: 'URL Slug',
      type: 'localeSlug',
      fieldset: 'countryLanding',
    }, 
    {
      name: 'countryImage',
      title: 'Country Image (Hero Image)',
      fieldset: 'countryLanding',
      type: 'picture',
    },
    {
      name: 'countryIntroduction',
      title: 'Country Introduction',
      type: 'localeBlock',
      fieldset: 'countryLanding',
    },
    {
      name: 'highlightsIntroduction',
      title: 'Highlights Introduction',
      type: 'localeBlock',
      fieldset: 'countryLanding',
    },
    {
      name: 'regionsIntroduction',
      title: 'Regions Introduction',
      type: 'localeBlock',
      fieldset: 'countryLanding',
    },
    {
      name: 'tripsIntroduction',
      title: 'Trips Introduction',
      type: 'localeBlock',
      fieldset: 'countryLanding',
    },
    {
      name: 'previousTripsIntroduction',
      title: 'Previous Trips Introduction',
      type: 'localeBlock',
      fieldset: 'countryLanding',
    },
    {
      name: 'accommodationIntroduction',
      title: 'Accommodation Introduction',
      type: 'localeBlock',
      fieldset: 'countryLanding',
    },
    {
      name: 'travelInfoIntroduction',
      title: 'Travel Info Introduction',
      type: 'localeBlock',
      fieldset: 'countryLanding',
    },
    {
      name: 'travelInfoImage',
      title: 'Travel Info Image',
      type: 'picture',
      fieldset: 'countryLanding',
    },
    {
      name: 'countryOverviewMetadata',
      type: 'pageMetadata',
      title: 'Country Overview Metadata',
      fieldset: 'countryOverview',
    },
    {
      name: 'countryOverviewSocialMetadata',
      type: 'pageMetadataSocial',
      title: 'Country Overview Social Metadata',
      fieldset: 'countryOverview'
    },
    {
      name: 'countryOverviewImage',
      title: 'Country Overview Image (Hero Image)',
      fieldset: 'countryOverview',
      type: 'picture',
    },    
    {
      name: 'countryOverviewIntroCopy',
      title: 'Intro Copy',
      type: 'localeBlock',
      fieldset: 'countryOverview',
    },
    {
      name: 'countryOverviewGallery',
      type: 'pictureGallery',
      fieldset: 'countryOverview',
      title: 'Gallery',
    },
    {
      name: 'countryOverviewOutroCopy',
      title: 'Outro Copy',
      type: 'localeBlock',
      fieldset: 'countryOverview',
    },
    {
      name: 'countryHighlightsMetadata',
      type: 'pageMetadata',
      title: 'Country Highlights Metadata',
      fieldset: 'highlights',
    },
    {
      name: 'countryHighlightsSocialMetadata',
      type: 'pageMetadataSocial',
      title: 'Country Highlights Social Metadata',
      fieldset: 'highlights'
    },
    {
      name: 'countryHighlightsImage',
      title: 'Country Highlights Image (Hero Image)',
      fieldset: 'highlights',
      type: 'picture',
    },            
    {
      name: 'countryHighlightsIntroCopy',
      title: 'Intro Copy',
      type: 'localeBlock',
      fieldset: 'highlights',
    },  
    {
      name: 'countryHighlights',
      title: 'Hightlights',
      fieldset: 'highlights',
      type: 'array',
        of: [
          {
            type: 'reference',
            to: [
              { type: 'region' }
            ]
          }
      ]
    },
    {
      name: 'countryRegionsMetadata',
      type: 'pageMetadata',
      title: 'Country Regions Metadata',
      fieldset: 'regions',
    },
    {
      name: 'countryRegionsSocialMetadata',
      type: 'pageMetadataSocial',
      title: 'Country Regions Social Metadata',
      fieldset: 'regions'
    },    
    {
      name: 'countryRegionsImage',
      title: 'Country Regions Image (Hero Image)',
      fieldset: 'regions',
      type: 'picture',
    },        
    {
      name: 'regionsIntro',
      title: 'Intro Copy',
      type: 'localeBlock',
      fieldset: 'regions',
    },
    {
      name: 'regions',
      title: 'Regions',
      type: 'array',
      fieldset: 'regions',
        of: [
          {
            type: 'reference',
            to: [
              { type: 'region' }
            ]
          }
      ]
    },
    {
      name: 'countryTripsMetadata',
      type: 'pageMetadata',
      title: 'Country Trips Metadata',
      fieldset: 'trips',
    },
    {
      name: 'countryTripsSocialMetadata',
      type: 'pageMetadataSocial',
      title: 'Country Trips Social Metadata',
      fieldset: 'trips'
    },   
    {
      name: 'countryTripsImage',
      title: 'Country Trips Image (Hero Image)',
      fieldset: 'trips',
      type: 'picture',
    },        
    {
      name: 'tripsIntro',
      title: 'Intro Copy',
      type: 'localeBlock',
      fieldset: 'trips',
    },
    {
      name: 'trips',
      title: 'Trips',
      type: 'array',
      fieldset: 'trips',
        of: [
          {
            type: 'reference',
            to: [
              { type: 'trip' }
            ]
          }
      ]
    },
    {
      name: 'countryPreviousTripsMetadata',
      type: 'pageMetadata',
      title: ' Previous trips Metadata',
      fieldset: 'previousTrips',
    },
    {
      name: 'countryPreviousTripsSocialMetadata',
      type: 'pageMetadataSocial',
      title: 'Country Previous Trips Social Metadata',
      fieldset: 'previousTrips'
    },
    {
      name: 'countryPreviousTripsImage',
      title: 'Country Previous Trips Image (Hero Image)',
      fieldset: 'previousTrips',
      type: 'picture',
    },        
    {
      name: 'previousTripsIntro',
      title: 'Intro Copy',
      type: 'localeBlock',
      fieldset: 'previousTrips',
    },
    {
      name: 'previousTrips',
      title: 'Previous Trips',
      fieldset: 'previousTrips',
      type: 'array',
        of: [
          {
            type: 'reference',
            to: [
              { type: 'trip' }
            ]
          }
      ]
    },
    {
      name: 'countryAccommodationMetadata',
      type: 'pageMetadata',
      title: 'Country Accommodation Metadata',
      fieldset: 'accommodation',
    },
    {
      name: 'countryAccommodationSocialMetadata',
      type: 'pageMetadataSocial',
      title: 'Country Accommodation Social Metadata',
      fieldset: 'accommodation'
    },
    {
      name: 'countryAccommodationImage',
      title: 'Country Accommodation Image (Hero Image)',
      fieldset: 'accommodation',
      type: 'picture',
    },           
    {
      name: 'accommodationIntro',
      title: 'Intro Copy',
      type: 'localeBlock',
      fieldset: 'accommodation',
    },
    {
      name: 'accommodation',
      title: 'Accommodation',
      fieldset: 'accommodation',
      type: 'array',
        of: [
          {
            type: 'reference',
            to: [
              { type: 'accommodation' }
            ]
          }
      ]
    },
    {
      name: 'countryTravelInformationMetadata',
      type: 'pageMetadata',
      title: 'Country Travel Information Metadata',
      fieldset: 'travelInformation',
    },
    {
      name: 'countryTravelInformationSocialMetadata',
      type: 'pageMetadataSocial',
      title: 'Country Travel Information Social Metadata',
      fieldset: 'travelInformation'
    },
    {
      name: 'countryTravelInformationImage',
      title: 'Country Travel Information Image (Hero Image)',
      fieldset: 'travelInformation',
      type: 'picture',
    },      
    {
      name: 'travelInformationSections',
      title: 'Travel Information Sections',
      fieldset: 'travelInformation',
      type: 'countryTravelInformation',
    }
  ],
  preview: {
    select: {
      image: 'countryImage.image',
      title: '<http://title.de|title.de>',
      subtitleSlug: 'slug.de.current' 
    },
    prepare(selection) {
      const { image, title, subtitleSlug } = selection;

      return {
        media: image,
        title: title,
        subtitle: `/country/de/${subtitleSlug}`
      };
    },
  },
  fieldsets: [
    {
      name: 'countryLanding',
      title: 'Landing Page',
      description: 'Manage Country Landing page',
      options: {
        collapsible: true,
        collapsed: true,
      }
    },  
    {
      name: 'countryOverview',
      title: 'Overview Page',
      description: 'Manage Overview page',
      options: {
        collapsible: true,
        collapsed: true,
      }
    },       
    {
      name: 'highlights',
      title: 'Highlights Page',
      description: 'Manage Highlights',
      options: {
        collapsible: true,
        collapsed: true,
      }
    },    
    {
      name: 'regions',
      title: 'Regions Page',
      description: 'Manage Regions',
      options: {
        collapsible: true,
        collapsed: true,
      }
    },
    {
      name: 'trips',
      title: 'Trips Page',
      description: 'Manage Trips',
      options: {
        collapsible: true,
        collapsed: true,
      }
    },
    {
      name: 'previousTrips',
      title: 'Previous Trips Page',
      description: 'Manage Previous Trips',
      options: {
        collapsible: true,
        collapsed: true,
      }
    },
    {
      name: 'accommodation',
      title: 'Accommodation Page',
      description: 'Manage Accommodation',
      options: {
        collapsible: true,
        collapsed: true,
      }
    },
    {
      name: 'travelInformation',
      title: 'Travel Information page',
      description: 'Manage Travel Information',
      options: {
        collapsible: true,
        collapsed: true,
      }
    },
  ],
}
Jun 29, 2022, 4:38 PM
Wow! This is a very large document! To clarify, are you doing field level translations on all of those `localeBlock`s?
Jun 29, 2022, 4:50 PM
user D
Have you been able to capture any errors from the browser console?
Jun 29, 2022, 5:03 PM
user M
Haha yeah itโ€™s a very big site, lots of data. Thats correct, we are doing field level translations on most fields ๐Ÿ™‚.

user A
Let me see what I can get (I have attached a screenshot I got from the client). I will do some editing on the Studio and will post what I get back.
Jun 29, 2022, 7:52 PM
Interesting. It might help to see the JSON of that document, if possible.
Jun 29, 2022, 8:33 PM
Thanks
user A
I will get this for you. Is there anyway for me to cleanly downgrade Sanity at the moment?
Jul 4, 2022, 9:50 AM
I think the easiest way is probably to run a command like
sanity upgrade --tag=2.29.0 --save-exact
. It will remove the caret(s) in package.json and prevent further upgrades unless added back.
You can also delete node_modules and your lock file, hard code package.json to the versions you want, then
sanity install
.
Jul 4, 2022, 7:11 PM
user A
Awesome! Thanks so much ๐Ÿ™‚
Jul 5, 2022, 1:22 PM
user A
You just saved my butt because I had a new view I was pushing and decided I'd be thoughtful and update to 2.31.00 with the new search, only to see that the weird "one doc at a time" glitch was there even though we still needed the new view.
Aug 26, 2022, 9:16 PM

Sanityโ€“ build remarkable experiences at scale

The Sanity Composable Content Cloud is the headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?