Skip to content

Deleted content items still present after refresh #3

Open
@jessevdp

Description

@jessevdp

When removing a piece of content from Umbraco and rebuilding the Gatsby frontend the piece of content is still available and outputted onto the site. The content node shouldn't be available since it's deleted in Umbraco.

This also happens when using the __refresh endpoint to refresh the data. Which is expected since it's the same code.

Note that when creating/updating a node in Umbraco and rebuilding, the changes are reflected correctly.

To reproduce

  1. Build the site as normal. (I've tested with gatsby develop)
  2. Remove a content node from Umbraco.
  3. Rebuild the site as normal. (e.g. stop and restart gatsby develop)
  4. Notice that the content node still exists in Gatsby. (e.g. by querying for it in the GraphiQL interface.)

👨‍⚕️ Diagnosis

It seems that this is related to Gatsby's build-caching mechanism, which automatically caches all nodes created by a plugin.

When you clean the cache before rebuilding the deleted node no longer shows up in the final site, this confirms the fact that this is related to Gatsby's build-caching.

🛠 Workaround

A simple workaround is to clear Gatsby's cache. The simplest way to do that is by using the gatsby clean command. (Also available at npm run clean, in our repository.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions