Skip to content

Collections created via Admin UI ("manual" source) return Page Not Found in admin — dashboard shows collection but content route is inaccessible #1641

Description

@sixcupsofcoffee

Description

When a new collection is created through Admin > Content Types after initial deployment, the admin UI shows the collection on the dashboard (with correct entry counts) but navigating to /_emdash/admin/content/{slug} returns a "Page Not Found" error. The collection and its table are fully present in the database — the issue is isolated to admin routing.

The collection appears correctly on the frontend (the site's public pages query it successfully), so this is purely an admin UI routing issue.

Steps to reproduce

  1. Deploy an EmDash site to Cloudflare Workers with an initial seed (e.g. posts, pages)
  2. After deployment, go to Admin > Content Types and create a new collection (e.g. currents, slug: currents, label singular: Current)
  3. Add fields to the collection via the field editor
  4. Save the collection — it appears on the admin dashboard with an arrow link
  5. Click the arrow on the dashboard card, or navigate directly to /_emdash/admin/content/currents
  6. Result: "Page Not Found" is displayed
  7. Navigate to /_emdash/admin/content/currents/new — same result

Additional investigation:

Verified via wrangler d1 execute that the collection is fully registered:

  • _emdash_collections contains the correct row with all fields populated
  • ec_currents table exists with correct schema
  • _emdash_fields contains all defined fields

Changing source from 'manual' to 'seed' directly in _emdash_collections via D1 did not resolve the issue. Re-deploying did not resolve it. The dashboard continues to show the collection and reflects correct entry counts when rows are inserted directly into the table.

By contrast, collections present in the seed at initial deploy time (posts, pages) are fully accessible in the admin — including when they have zero entries.

Environment

emdash version: 0.6.0
Runtime: Cloudflare Workers (via @astrojs/cloudflare + @emdash-cms/cloudflare)
Database: Cloudflare D1
Storage: Cloudflare R2
Operating system: macOS
Browser: Safari 18

Logs / error output

No server-side error logs visible. The admin UI renders a "Page Not Found" message client-side. D1 queries confirm the collection exists and is correctly structured — no database errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions