🔮 Sanity Create is here. Writing is reinvented. Try now, no developer setup

Issue with changes not showing up on production deployment without redeploying

23 replies
Last updated: May 31, 2023
Hey all, I having an issue : changes made in studio show up on my local deployment, but not on the production deployment(unless i redeploy) could someone help me out?
May 31, 2023, 4:43 AM
Hmm...if your production deploy is a static site, as normal, it would have to be rebuilt each time you wanted to show results of editing in the Studio.
A redeploy would do that -- so does this picture sound a fit?
May 31, 2023, 6:18 AM
i've used export const dynamic = 'force-dynamic' on most of the pages, are there other settings required for enabling ssr? (im fairly new to next)
May 31, 2023, 6:46 AM
thank you for your reply btw!
May 31, 2023, 6:47 AM
well, not a next-pert, and it's late, but that sounds reasonable until someone else may clarify. The other possibility would seem that your production server is looking at a different Sanity dataset than your local, might check that?
May 31, 2023, 6:48 AM
Just checked, i currently only have 1 dataset
May 31, 2023, 6:50 AM
Is this a long-term situation, or maybe just for a few minutes after you update? Because then it could be that you've got the productiron server looking at the Content CDN, instead fo the Content API, and the delay would be for the update interval of the CDN.
May 31, 2023, 6:52 AM
Thanks for your help, will check a bit later today, it is in fact late
May 31, 2023, 6:53 AM
You're welcome, and let us know 🙂
May 31, 2023, 6:53 AM
You'll want to look at whether
useCdn
is true or false (set it) in creation config for the Sanity client reading your data to be served -- in the morning ;)
May 31, 2023, 6:55 AM
If you’re on nextjs add revalidate = 10
This will help you
May 31, 2023, 12:49 PM
Good day, usecdn set to true, is that the recommended setting?
I will try the revalidate option
May 31, 2023, 2:27 PM
revalidate is probably the best option
May 31, 2023, 2:31 PM
Thank you, works now, any reason why revalidate works but exportiing dynamic didnt?
May 31, 2023, 2:53 PM
not sure why
May 31, 2023, 2:54 PM
i am glad it worked for you
May 31, 2023, 2:54 PM
ok last question, whats the recommended usage
May 31, 2023, 3:05 PM
On the component itself? or within fetch?
May 31, 2023, 3:05 PM
on the page something like this
export const revalidate = 60;
May 31, 2023, 3:10 PM
ok
May 31, 2023, 3:13 PM
thanks again
May 31, 2023, 3:13 PM
May 31, 2023, 3:14 PM
this is currently what im working on btw
May 31, 2023, 3:14 PM
when its officially launched ill submit it into the "i-made-this" section
May 31, 2023, 3:15 PM

Sanity– build remarkable experiences at scale

Sanity is a modern 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?