Issue with changes not showing up on production deployment without redeploying
23 replies
Last updated: May 31, 2023
C
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
C
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?
A redeploy would do that -- so does this picture sound a fit?
May 31, 2023, 6:18 AM
C
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
C
thank you for your reply btw!
May 31, 2023, 6:47 AM
C
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
C
Just checked, i currently only have 1 dataset
May 31, 2023, 6:50 AM
C
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
C
Thanks for your help, will check a bit later today, it is in fact late
May 31, 2023, 6:53 AM
C
You're welcome, and let us know 🙂
May 31, 2023, 6:53 AM
C
You'll want to look at whether
useCdnis 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
S
If you’re on nextjs add revalidate = 10
This will help you
This will help you
May 31, 2023, 12:49 PM
C
Good day, usecdn set to true, is that the recommended setting?
I will try the revalidate option
I will try the revalidate option
May 31, 2023, 2:27 PM
S
revalidate is probably the best option
May 31, 2023, 2:31 PM
C
Thank you, works now, any reason why revalidate works but exportiing dynamic didnt?
May 31, 2023, 2:53 PM
S
not sure why
May 31, 2023, 2:54 PM
S
i am glad it worked for you
May 31, 2023, 2:54 PM
C
ok last question, whats the recommended usage
May 31, 2023, 3:05 PM
C
On the component itself? or within fetch?
May 31, 2023, 3:05 PM
S
on the page something like this
export const revalidate = 60;
May 31, 2023, 3:10 PM
C
ok
May 31, 2023, 3:13 PM
C
thanks again
May 31, 2023, 3:13 PM
C
May 31, 2023, 3:14 PM
C
this is currently what im working on btw
May 31, 2023, 3:14 PM
C
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.