-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Visual Editing/Presentation - page navigation not working? #209
Comments
The "Edit in Studio" link doesn't open the correct page in Studio either. I'm running studio separately from the Astro site. |
I've been following all the available docs/etc and have ultimately ended up with the same issue (using vercel and ssr). Is there any known fix as of now? |
Similar to this and other open tickets- my visual editor works fine initially and as soon as I use it to navigate to other pages it completely stops functioning. I've tried everything here and scoured the internet to make sure this isn't an issue with my configuration. My build is practically the example in the official docs (astro + sanity + vercel). It seems like this integration/docs has caused frustration for others as well, and this particular issue has been open for months without a clear resolution. As an official/marketed integration, it would be great to see a solution or update from the maintainers. If I am missing something or if there's a workaround- please let me know. |
Coming back to this 5 months later, still with no official response. I've now updated the integration to its latest version (3.1.9) and updated Sanity to its latest version (3.68.3). I'm still experiencing the issue, and it basically renders Presentation unusable for me. This is a pretty big feature and selling point of Sanity, and I don't want to ditch Astro just to support it. Would be lovely to get some kind of official response on the matter. |
Describe the bug
When configuring the integration for visual editing/presentation (per the readme), everything works great except for page navigations within Sanity's
Presentation
tab. When trying to navigate (via link or manually changing the URL within the Presentation view), the page does not reload. In order to see the page that was navigated to, the current Sanity studio page must be manually reloaded.To Reproduce
Steps to reproduce the behavior:
loadQuery
demo code from readme)Presentation
viewExpected behavior
Pages should reload/navigate automatically when the route is changed, per Sanity's presentation demos for other frameworks (e.g. Remix)
Screenshots
![Screenshot 2024-08-07 at 2 35 32 PM](https://private-user-images.githubusercontent.com/72172419/356000834-1d283f8e-2065-4f5c-8281-9ae8a3ac01b9.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0NDgwMjgsIm5iZiI6MTczOTQ0NzcyOCwicGF0aCI6Ii83MjE3MjQxOS8zNTYwMDA4MzQtMWQyODNmOGUtMjA2NS00ZjVjLTgyODEtOWFlOGEzYWMwMWI5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEzVDExNTUyOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWE5OTYyM2ViM2M3YzdmOTJmNzg1OWZkODAwNWZjM2I0MzM2NjkxNWZjM2I0ZjliYWUxZTdjZjgxMTNkZjFkNDcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.OlIwgwAGVDFBFjpa5igw5rBMhRIr5gnneDKoLEkPDm4)
Initial view in Presentation of homepage:
Upon trying to manually change the route within Sanity Studio:
![Screenshot 2024-08-07 at 2 35 47 PM](https://private-user-images.githubusercontent.com/72172419/356001047-0bb78a69-b5b0-424c-858d-e92972b547bf.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0NDgwMjgsIm5iZiI6MTczOTQ0NzcyOCwicGF0aCI6Ii83MjE3MjQxOS8zNTYwMDEwNDctMGJiNzhhNjktYjViMC00MjRjLTg1OGQtZTkyOTcyYjU0N2JmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEzVDExNTUyOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWE3OGY0M2JhNmQyZDRmMmRjN2NmMDAzMzAxN2Q5NmQ3YjEyNjMzNWVkYjczMTY5YzY3MmJjZDY2NWFkYWQwMGEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.OfmGglDIl8pBWpVUSH6z7fO2NnOCziuIaGL1th6dYy4)
Note that data + page being rendered is still for homepage.
After browser refresh/full reload of sanity studio:
![Screenshot 2024-08-07 at 2 36 22 PM](https://private-user-images.githubusercontent.com/72172419/356001229-ca4160ae-7966-4585-b570-484a946b6756.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0NDgwMjgsIm5iZiI6MTczOTQ0NzcyOCwicGF0aCI6Ii83MjE3MjQxOS8zNTYwMDEyMjktY2E0MTYwYWUtNzk2Ni00NTg1LWI1NzAtNDg0YTk0NmI2NzU2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEzVDExNTUyOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTNiMzFhZWExNTEyZDdmNzk3OWY1MzczMzFjYzZkNGUyZDY5ZTZkOGQwZDEzOGI3ZjRjNzJmMjdmYmQ1OTRiNTMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.Dsf2HGTpwsO-Ad4NBEzWZNQKHEp-cUKpgXsD-fm5PKo)
Correct data is now displayed
Which versions of Sanity are you using?
Run
sanity versions
in the terminal and copy-paste the result here:What operating system are you using?
Mac OS 13.6
Which versions of Node.js / npm are you running?
Run
npm -v && node -v
in the terminal and copy-paste the result here:NPM: 10.2.3
Node: v18.19.0
Additional context
Refresh
button above the iframe pane in Sanity'sPresentation
mode also does not have an effectnetlify dev
loadQuery
demo code provided in the readme, but I am not sureThe text was updated successfully, but these errors were encountered: