Skip to content

Deleted content collection entry persists in collection data #16561

@delucis

Description

@delucis

Astro Info

Astro                    v6.2.1
Vite                     v7.3.2
Node                     v22.22.0
System                   Linux (x64)
Package Manager          npm
Output                   static
Adapter                  none
Integrations             none

If this issue only occurs in one browser, which browser is a problem?

n/a

Describe the Bug

When deleting a content collection entry, the entry is not removed from the collection data and an Astro page using getCollection() continues to show the entry even after deletion.

This is the case even after a manual s + enter sync. Only a dev server restart seems to flush the deleted entry.

To reproduce using the reproduction:

  1. Start the dev server and visit /
  2. Delete any Markdown file in src/collection/
  3. Observe that the page does not update, even when refreshed, and even when forcing a sync by using the s + enter dev server shortcut in the terminal.

What's the expected result?

Deleting an entry should delete the entry.

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-ifpkgysp-lxxs72xs

Participation

  • I am willing to submit a pull request for this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    - P4: importantViolate documented behavior or significantly impacts performance (priority)feat: content collectionsRelated to the Content Collections feature (scope)

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions