Netlify CMS updated locally but not on Netlify

I tweaked my Netlify CMS to allow videos and added some other fields. Works locally. I git added/commited/pushed to origin master, where I can see that my content updated, but .netlify.app/admin’s CMS is outdated. How can I update it?

Hi @steph, is this the same issue as local CMS changes not reflected online · Issue #3961 · netlify/netlify-cms · GitHub?
Do you mind trying:

gatsby clean
gatsby build
gatsby serve

To see if the changes are shown locally.
If they are can you please try re-deploying while clearing build cache?

Did those steps (I regularly do gatsby clean) and committed/pushed to master, but still having the same issue. When I go to the online admin and enter a post or make a new work I don’t see my CMS changes, then I empty the cache and reload, enter a post, CMS changes are there. But when I type in the admin url again, changes aren’t there. Very strange.

1 Like

Hi @steph,
That is very strange indeed.
Things to try:

  1. Different browser
  2. Private mode
  3. Disable gatsby-plugin-offline | Gatsby (clear cache after disabling it). I’ve seen cases where that plugin will cache everything under /admin. See portfolio/gatsby-config.js at 5ac97b7406a78bbd7c306be9a5caeee69deb9089 · stephaniedavidson/portfolio · GitHub. If that is the issue you should be able to exclude the CMS from caching via gatsby-plugin-offline | Gatsby

ah ha! It did work in Firefox and in Chrome incognito. Progress! Thanks erez!!

Rather than adding that offline package override code, can I just npm uninstall gatsby-plugin-offline, or is it an essential part of Gatsby? I don’t fully understand the override code or what this package is doing so would prefer to omit it rather than edit it, if that makes sense.

I see it says in that doc:
“If you want to remove gatsby-plugin-offline from your site at a later point, substitute it with gatsby-plugin-remove-serviceworker to safely remove the service worker”

must I have one or the other?

I think you need both actually:

npm install gatsby-plugin-remove-serviceworker
npm uninstall gatsby-plugin-offline

Since the service worker might already be installed for users who visited your site you need to remove it from the current version of your site and use gatsby-plugin-remove-serviceworker to remove existing installations of it from any users that previously visited the site.

At some point you can remove gatsby-plugin-remove-serviceworker once you’re sure no user has the service worker installed (I would just wait a couple of week and then remove it).