0

I am having a problem using Netlify CMS with BitBucket.When I create a post in the CMS editor it saves correctly to the BitBucket repo,Netlify does a build and it publishes to Gatsby front-end without any problem.

However,when CMS is refreshed,none of the posts are visible,so cannot be edited without going into BitBucket and editing directly or pulling to local repo for editing and pushing again.Obviously this defeats the purpose of a CMS in the first place.

For reference I am using the Kaldi Gatsby/Netlify CMS starter the source code for which can be found here.

Here is what I see in the CMS directly after a post is created. enter image description here

But when the CMS page is refreshed the Blog list is empty despite the post saving to BitBucket and showing on front-end. enter image description here

I have looked through the Gatsby code trying to find something which could be causing the posts not to display in the CMS,but cannot see anything.If anyone has any ideas where to look or why this is happening I'd be grateful for any help.Thanks in advance!

UPDATE

Incidentally,the web pages included in the Kaldi template show up fine in the CMS.

enter image description here

I checked the console after trying to load the blog collection and it lists the error below for all the post markdown files.So it seems the CMS is trying to get them but can't for some reason.Unfortunately,the expanded view of the error doesn't offer any pointers to the source of the problem.

enter image description here

Thanks again for any assistance!

mikeym
  • 5,705
  • 8
  • 42
  • 62
  • When do you see the above error? – ksav Apr 13 '20 at 22:42
  • Could this be a race condition? Or caching? – Chris Apr 14 '20 at 10:26
  • @ksav because the `Blog` collection is the default view in the CMS,the above console errors appear immediately after navigating to `/admin`. – mikeym Apr 14 '20 at 13:56
  • @Chris The `page` collection loads the page content from BitBucket fine so I would be very surprised if there are any race conditions at play here.Likewise,I am doubtful caching is the problem. – mikeym Apr 14 '20 at 14:01
  • So it seems this does not have anything to do with gatsby? If so, it's probably best to remove the gatsby tag to avoid confusion. – ksav Apr 14 '20 at 22:37
  • @ksav unfortunately,removing Gatsby is not an option.It is a requirement for the front-end. – mikeym Apr 16 '20 at 16:21
  • I was referring to the gatsby tag on this question. – ksav Apr 16 '20 at 23:20
  • @ksav sorry,I misread your comment.The Kaldi template comes with Netlify CMS kind of baked in so I'm not completely sure it isn't something in the Gatsby code that is causing the problem on the Netlify side.I am new to the JAM stack and the front and backend seem less decoupled than with something like MEAN or MERN. – mikeym Apr 17 '20 at 00:08

0 Answers0