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

Issue with missing data in deployed Sanity studio resolved by redeploying

13 replies
Last updated: Feb 13, 2021
What could be the reason that content exists just on localhost but not online on sanity? …
Feb 13, 2021, 5:48 PM
I can't think of a reason why that would be the case, since all data gets routed through Sanity (regardless of whether your studio is deployed on Sanity, Netlify, Vercel, or locally).
Feb 13, 2021, 6:27 PM
Perhaps your schema that's deployed isn't set up, or is missing the needed fields? When you look at your deployed studio do you get a bunch of "content is missing" or "found unknown fields" errors?
Feb 13, 2021, 6:34 PM
Hi User, thanks for your message.Everything seems fine locally:
Feb 13, 2021, 6:38 PM
Feb 13, 2021, 6:39 PM
in the beginning, it worked. Then I started working on it, and I suddenly realized (coincidentally) that there’s no data online anymore …
Feb 13, 2021, 6:40 PM
could it be connected to my dataset being private? I use env vars in my sanity.json https://github.com/repetitioestmaterstudiorum/mh-be-sanity/blob/master/sanity.json
Feb 13, 2021, 6:40 PM
If your dataset is private you’ll need to authenticate every request.
Feb 13, 2021, 6:41 PM
Can you elaborate? In Gatsby, I have the necessary setup (using a token). But how is this connected to my backend on sanity.studio?Locally, I have all data in the sanity backend, but online there’s nothing
Feb 13, 2021, 6:42 PM
When you say “online there’s nothing” are you saying Gatsby isn’t pulling in data from Sanity? Or do you mean that your deployed studio sees nothing?
Feb 13, 2021, 6:44 PM
My Gatsby isn’t deployed anywhere yet. I’m not experiencing any issues in connection to Gatsby.What I mean is when I go to
http://localhost:3333/desk/ I see my content, but when I go to https://<myproject>.sanity.studio/desk/ there is no content.If https://<myproject>.sanity.studio/desk/ is a deployed studio, then that’s exactly what I mean
Feb 13, 2021, 6:46 PM
Found the solution: had to run
sanity deploy
again. Don’t know why, but one of the changes I’ve made led to that …
Feb 13, 2021, 7:08 PM
user A
your questions made me google things that led me to the answer
Feb 13, 2021, 7:09 PM
Glad to hear it, User!
Feb 13, 2021, 7:34 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?