-
Notifications
You must be signed in to change notification settings - Fork 15
Description
π Describe the Bug
When running the "tina-astro-starter" locally in development mode,
new entries added to a collection aren't rendered properly after Save.
The entry appears in the list of entries in the collection but clicking on the entry shows a 404 page instead.
This condition persists until tina/astro is restarted manually.
I did not try any other integration, nor did I try Tina Cloud.
π§βπ» Reproduction Steps
cd /tmppnpx create-tina-app@latest --template tina-astro-starter
β Which package manager would you like to use? βΊ pnpm
β What is your project named? β¦ my-tina-appcd my-tina-apppnpm run dev- open http://localhost:4321/admin/index.html#/collections/blog/~
- press Add Files
- Enter 'New' for Title, Description, Body and Filename. Choose todays for Publication Date and Updated Date.
- Press Save
- Observe "New" appears in the Blogs list
- Click on the "New" blog just created
- Observe browser navigates to url http://localhost:4321/admin/index.html#/~/blog/New
- Observe the astro logo and "404: Not found", "Path: /blog/New"
- Observe error in the terminal
12:22:46 [WARN] [router] A `getStaticPaths()` route pattern was matched, but no matching static path was found for requested path `/blog/New`.
Possible dynamic routes being matched: src/pages/blog/[...slug].astro, src/pages/[...slug].astro.
12:22:46 [404] /blog/New 3ms
- In the terminal, press Ctrl-C
pnpm run dev- Refresh the page in the browser
- Observe the http://localhost:4321/admin/index.html#/~/blog/New page renders without error
π― Expected Behaviour
The new content should appear after it's created.
The user should not have to manually restart tina/astro after adding a new entry.
If this is a known limitation of the tina-astro integartion, the documentation
https://tina.io/docs/frameworks/astro should point it out.
Possibly related
tinacms/tinacms#2534 reports that restart is required
when adding a new collection, but in this case a restart is required when adding
a new entry to a collection.