You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current code assumes use of its embedded Studio ability, and will cause a seeming Astro error if a fully pathed Studio url is attempted. However, after discussion with them, it's clear the problem is that @sanity/astro is in this case attempting to add an Astro route which is not within the Astro app, which it properly rejects.
This report will be referenced by a simple PR which avoids this problem, allowing separate Studios to be used.
To Reproduce
in a Sanity Astro project's astro.config, set studioBasePath to any full protocol-domain url (e.g. http://localhost:3333), rather than the usual path only (e.g. /admin)
attempt to start the app in dev
Note a crash occurs, with a spurious-seeming error from Astro
Expected behavior
A full protocol-domain url studioBasePath should be always accepted, and operate as expected if it points to an available Sanity Studio.
… the blog folder to go through steps of setting it up. The entire repo has been updated to recent Sanity and Astro versions, to avoid recent problems and those with mixed app requirements. So be sure to build the package first, as it is used by blog and others rather than the published package. The fix is included from PR sanity-io#210.
narration-sd
added a commit
to narration-sd/sanity-astro
that referenced
this issue
Aug 18, 2024
… the blog folder to go through steps of setting it up. The entire repo has been updated to recent Sanity and Astro versions, to avoid recent problems and those with mixed app requirements. So be sure to build the package first, as it is used by blog and others rather than the published package. The fix is included from PR sanity-io#210. Pick up also the pnpm-lock.json, this push....
Describe the bug
The current code assumes use of its embedded Studio ability, and will cause a seeming Astro error if a fully pathed Studio url is attempted. However, after discussion with them, it's clear the problem is that @sanity/astro is in this case attempting to add an Astro route which is not within the Astro app, which it properly rejects.
This report will be referenced by a simple PR which avoids this problem, allowing separate Studios to be used.
To Reproduce
astro.config
, setstudioBasePath
to any full protocol-domain url (e.g. http://localhost:3333), rather than the usual path only (e.g. /admin)Expected behavior
A full protocol-domain url
studioBasePath
should be always accepted, and operate as expected if it points to an available Sanity Studio.Which versions of Sanity are you using?
$ sanity versions
@sanity/cli (global) 3.53.0 (latest: 3.54.0)
@sanity/prettier-config 1.0.2 (up to date)
What operating system are you using?
Windows 11 very latest
Which versions of Node.js / npm are you running?
$ pnpm -v && node -v
9.1.2
v20.11.1
Additional context
@sanity/[email protected]
Security issue?
none
The text was updated successfully, but these errors were encountered: