Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deleted content items still present after refresh #3

Open
jessevdp opened this issue Nov 27, 2019 · 0 comments
Open

Deleted content items still present after refresh #3

jessevdp opened this issue Nov 27, 2019 · 0 comments
Labels
bug Something isn't working

Comments

@jessevdp
Copy link
Contributor

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.)

@jessevdp jessevdp added the bug Something isn't working label Nov 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant