I edit my nextjs CMS in the admin area but i dont see the edits on my actual blog

Hi Netlify community,

I am a new Netlify user. I just finished creating a blog site with Nextjs and i deployed with Netlify so my blog is now live and it works. I logged in the admin area and i added few pages saved and published but nothing has changed on my actual blog. the config.yml is properly set and all the fields are shown on the cms. I also see all the edits and the added md files in the content folder. But no edits are shown on the live site. Any ideas? Thanks

If your Git repo is indeed updating to show the edits made by CMS, but only Netlify website is not updating, I think you need to check if somehow Netlify and your Git repo are disconnected. This might happen if say you have stopped the builds, or have au-publishing disabled or Netlify isn’t able to access your repo at all.

EDIT: Chances are, your builds might be failing. Have you checked your deploys section?

The github Deploy status badge shows β€˜success’ and I don’t see any errors on the deploy log - still non of the edits in the admin cms page are shown on the actual site.

Here is the Deploy log if that helps:

9:41:17 PM: Build ready to start
9:41:19 PM: build-image version: d84c79427e8f83c1ba17bcdd7b3fe38059376b68
9:41:19 PM: build-image tag: v3.6.1
9:41:19 PM: buildbot version: b5aa40ef41f8f8b302713d535e9a3180a3b0e301
9:41:19 PM: Fetching cached dependencies
9:41:19 PM: Starting to download cache of 125.7MB
9:41:20 PM: Finished downloading cache in 946.976542ms
9:41:20 PM: Starting to extract cache
9:41:24 PM: Finished extracting cache in 3.427441298s
9:41:24 PM: Finished fetching cache in 4.419933603s
9:41:24 PM: Starting to prepare the repo for build
9:41:24 PM: Preparing Git Reference refs/heads/main
9:41:27 PM: Starting build script
9:41:27 PM: Installing dependencies
9:41:27 PM: Python version set to 2.7
9:41:28 PM: Started restoring cached node version
9:41:30 PM: Finished restoring cached node version
9:41:31 PM: v12.18.0 is already installed.
9:41:31 PM: Now using node v12.18.0 (npm v6.14.4)
9:41:31 PM: Started restoring cached build plugins
9:41:31 PM: Finished restoring cached build plugins
9:41:31 PM: Attempting ruby version 2.7.1, read from environment
9:41:33 PM: Using ruby version 2.7.1
9:41:33 PM: Using PHP version 5.6
9:41:33 PM: Started restoring cached node modules
9:41:33 PM: Finished restoring cached node modules
9:41:34 PM: Started restoring cached go cache
9:41:34 PM: Finished restoring cached go cache
9:41:34 PM: go version go1.14.4 linux/amd64
9:41:34 PM: go version go1.14.4 linux/amd64
9:41:34 PM: Installing missing commands
9:41:34 PM: Verify run directory
9:41:35 PM: ​
9:41:35 PM: ────────────────────────────────────────────────────────────────
9:41:35 PM: Netlify Build
9:41:35 PM: ────────────────────────────────────────────────────────────────
9:41:35 PM: ​
9:41:35 PM: ❯ Version
9:41:35 PM: @netlify/build 8.1.0
9:41:35 PM: ​
9:41:35 PM: ❯ Flags
9:41:35 PM: deployId: 600ddb6dc2eb120007146a0b
9:41:35 PM: mode: buildbot
9:41:35 PM: ​
9:41:35 PM: ❯ Current directory
9:41:35 PM: /opt/build/repo
9:41:35 PM: ​
9:41:35 PM: ❯ Config file
9:41:35 PM: No config file was defined: using default values.
9:41:35 PM: ​
9:41:35 PM: ❯ Context
9:41:35 PM: production
9:41:35 PM: ​
9:41:35 PM: ────────────────────────────────────────────────────────────────
9:41:35 PM: 1. Build command from Netlify app
9:41:35 PM: ────────────────────────────────────────────────────────────────
9:41:35 PM: ​
9:41:35 PM: $ npm run export
9:41:36 PM: > next-bagaski@0.1.0 export /opt/build/repo
9:41:36 PM: > next export
9:41:36 PM: info - using build directory: /opt/build/repo/.next
9:41:36 PM: info - Copying β€œstatic build” directory
9:41:36 PM: info - No β€œexportPathMap” found in β€œnext.config.js”. Generating map from β€œ./pages”
9:41:36 PM: info - Launching 7 workers
9:41:36 PM: info - Exporting (0/3)
9:41:36 PM: info - Copying β€œpublic” directory
9:41:36 PM: info - Exporting (3/3)
9:41:36 PM: Export successful. Files written to /opt/build/repo/out
9:41:36 PM: ​
9:41:36 PM: (build.command completed in 1.2s)
9:41:36 PM: ​
9:41:36 PM: ────────────────────────────────────────────────────────────────
9:41:36 PM: Netlify Build Complete
9:41:36 PM: ────────────────────────────────────────────────────────────────
9:41:36 PM: ​
9:41:36 PM: (Netlify Build completed in 1.3s)
9:41:37 PM: Caching artifacts
9:41:37 PM: Started saving node modules
9:41:37 PM: Finished saving node modules
9:41:37 PM: Started saving build plugins
9:41:37 PM: Finished saving build plugins
9:41:37 PM: Started saving pip cache
9:41:37 PM: Finished saving pip cache
9:41:37 PM: Started saving emacs cask dependencies
9:41:37 PM: Finished saving emacs cask dependencies
9:41:37 PM: Started saving maven dependencies
9:41:37 PM: Finished saving maven dependencies
9:41:37 PM: Started saving boot dependencies
9:41:37 PM: Finished saving boot dependencies
9:41:37 PM: Started saving rust rustup cache
9:41:37 PM: Finished saving rust rustup cache
9:41:37 PM: Started saving go dependencies
9:41:37 PM: Finished saving go dependencies
9:41:37 PM: Build script success
9:41:37 PM: Starting to deploy site from β€˜out’
9:41:37 PM: Creating deploy tree
9:41:37 PM: Creating deploy upload records
9:41:37 PM: 0 new files to upload
9:41:37 PM: 0 new functions to upload
9:41:37 PM: Starting post processing
9:41:37 PM: Post processing - HTML
9:41:37 PM: Post processing - header rules
9:41:37 PM: Post processing - redirect rules
9:41:37 PM: Post processing done
9:41:37 PM: Site is live :sparkles:
9:41:54 PM: Finished processing build request in 34.629630621s

Would you be willing to share your repo?

sure here it is: https://github.com/bagaski/next-bagaski-blog

I just deployed your repo as a new website, enabled Identity and tried to update a post and it worked.

Check first commit: https://600e85ccbc194efcc6ad8164--loving-galileo-902540.netlify.app/2021-01-24-2021-updates

Updated: https://loving-galileo-902540.netlify.app/2021-01-24-2021-updates

And as you can see, haven’t changed anything of your repo: https://github.com/Hrishikesh-K/next-bagaski-blog-main

Would it be possible for you to create a new Netlify website and try the same?

1 Like

ok thanks i will try that!

1 Like

so still no luck! I created a new netlify site and i haven’t managed to edit anything even though i go to admin and i have created new blogposts.
this is the new site: https://ecstatic-carson-df47f2.netlify.app/
this is the previous: https://next-bagaski-blog.netlify.app/
and my new site’s admin page with new edits that dont show on the live site…


Something must be wrong with the settings i have selected i guess?

I hope you don’t mind, I created an account on this new website, to test. However, I’ve no explanation as to why this is happening.

I don’t think so. I used the exact same repo that you shared and didn’t edit a thing, it still worked perfectly. I just added another post to the website I shared and it worked without any hassle.

Can you confirm if those updates are getting committed to your repo? If yes (they probably are), maybe there’s something wrong with your Netlify account and GitHub account’s connection. Can you try manually pushing a change to your GitHub repo and see if Netlify initiates a build? If not, maybe you’d want to disconnect Netlify from your GitHub and add it again.

Can you confirm if those updates are getting committed to your repo?

they do - i updated again the cms and i see the new .md files added in my repo’s content folder.

Can you try manually pushing a change to your GitHub repo and see if Netlify initiates a build?

i just did some changes on my github repository and netlify initiated a build successfully.

Does this new build include the new posts and edits?

so I it seems that i can only make it work when:

i edit the cms -> then i pull the updated repo locally -> i do a new build locally and push to my git repository -> then the updated site is live.

This should not have worked like this. I’m sorry but I’m out of possible reasons why it’s not working for you, especially when the exact same setup is working for me.

Some member from the support team will soon answer.

1 Like

Heya @bagaski and sorry to hear about the continuing trouble.

I’d like to take a step back - when you build locally, do you see the correct output? You make an edit online, it commits the change, you pull your repo, and you build - are those edits there? The usual cause of these problems is misconfiguration around builds, rather than we’re serving the wrong thing, so I’d like to see a clear delineation between those symptoms so we can make sure we’re debugging the right thing.

You can download a copy of a build here and see what is different, using this icon in our UI:

image

I’d expect that your build and our build, from the same commit hash, would be the same. If not, it is likely that you have not configured things identically locally and remotely - as described here: Manage build dependencies | Netlify Docs - so do take a look at that and please confirm that you’ve set the same node version and other dependency versions here as locally, before debugging any differences between the local and remote build further.