Netlify-cms: [Editorial workflow] Failed to load entry: API_ERROR

Created on 5 Feb 2020  ·  6Comments  ·  Source: netlify/netlify-cms

Describe the bug
Hi Gents, I have an issue with editorial workflow. When I am opening my index page in CMS with saved draft edits I see errors and endless loading:

Failed to load entry: API_ERROR: {"type":"error","error":{"message":"No such file or directory: undefined"}}

In my dev console I see two network requests which failed with 404:

Request URL: https://api.bitbucket.org/2.0/repositories/myrepo/src/12long-commit-name86/undefined?ts=1580890610467
Request Method: GET
Status Code: 404 
Request URL: https://api.bitbucket.org/2.0/repositories/myrepo/src/11long-commit-name22/undefined?ts=1580890610476
Request Method: GET
Status Code: 404 



md5-3fec34fae04980533f73191ccb769553



backend: {
    name: 'bitbucket',
    repo: 'myrepo',
    auth_type: 'implicit',
    branch: 'test'
    app_id: process.env.BITBUCKET_AUTH_TOKEN,
  },



md5-bf86475d680521cb0e86809f3b66487a



backend:
  commit_messages:
    create: 'Create {{collection}} “{{slug}}”'
    update: 'Update {{collection}} “{{slug}}”'
    delete: 'Delete {{collection}} “{{slug}}”'
    uploadMedia: '[skip ci] Upload “{{path}}”'
    deleteMedia: '[skip ci] Delete “{{path}}”'

publish_mode: editorial_workflow
media_folder: static/img
public_folder: /img

collections:

  - name: 'pages'
    label: 'Pages'
    files:
      # INDEXPAGE
      - file: 'src/pages/index.md'
        label: 'Home'
        name: 'indexpage'
        fields:
          - { label: 'Template Key', name: 'templateKey', widget: 'hidden', default: 'index-page' }
          # HERO Block
          - {
              label: 'Hero block',
              name: heroBlock,
              widget: object,
              fields:
                [
                  { label: 'Smaller Title', name: smTitle, widget: string },
                  { label: 'Bigger Title', name: bgTitle, widget: string },
                  { label: 'Description', name: description, widget: text },
                  { label: 'Background video (vimeo video url)', name: backVideo, widget: string },
                  {
                    label: 'Background Image Container',
                    name: backImageContainer,
                    widget: object,
                    fields: [{ label: Image, name: src, widget: image }, { label: Alt, name: alt, widget: string }],
                  },
                  {
                    label: 'Background Small Image Container',
                    name: backSmallImageContainer,
                    widget: object,
                    fields: [{ label: Image, name: src, widget: image }, { label: Alt, name: alt, widget: string }],
                  },
                  { label: 'Button label', name: buttonLabel, widget: string },
                ],
            }
          - {
              label: 'why you should join',
              name: whyYouShouldJoin,
              widget: object,
              fields:
                [
                  { label: Title, name: title, widget: string },
                  { label: SubTitle, name: subTitle, widget: string },
                  { label: Description, name: description, widget: text },
                  { label: 'Vimeo video url', name: videoURL, widget: string },
                  { label: 'Button label', name: buttonLabel, widget: string },
                ],
            }
          - {
              label: 'Access thousands',
              name: accessThousands,
              widget: object,
              fields:
                [
                  { label: Title, name: title, widget: string },
                  { label: Description, name: description, widget: text },
                  { label: 'Button label', name: buttonLabel, widget: string },
                  {
                    label: slider,
                    name: slider,
                    widget: 'list',
                    field:
                      {
                        label: 'Image container',
                        name: imageContainer,
                        widget: object,
                        fields: [{ label: Image, name: src, widget: image }, { label: Alt, name: alt, widget: string }],
                      },
                  },
                ],
            }

          - {
              label: 'Personal reviews',
              name: personalReviews,
              widget: object,
              fields:
                [
                  { label: Title, name: title, widget: string },
                  { label: Description, name: description, widget: text },
                  { label: 'Button label', name: buttonLabel, widget: string },
                  { label: 'Vimeo video url', name: videoURL, widget: string },
                ],
            }
          - {
              label: 'The best guidance',
              name: theBestGuidance,
              widget: object,
              fields:
                [
                  { label: Title, name: title, widget: string },
                  { label: Description, name: description, widget: text },
                  { label: 'Button label', name: buttonLabel, widget: string },
                  { label: 'Vimeo video url', name: videoURL, widget: string },
                ],
            }

          - {
              label: 'Thousands',
              name: thousands,
              widget: object,
              fields:
                [
                  { label: Title, name: title, widget: string },
                  {
                    label: 'Background Image',
                    name: backgroundImage,
                    widget: image,
                  },
                  {
                    label: Discs,
                    name: discs,
                    widget: list,
                    fields: [
                      { label: Title, name: title, widget: string },
                      {
                        label: 'Image Container',
                        name: imageContainer,
                        widget: object,
                        fields:
                          [{ label: Image, name: src, widget: image }, { label: Alt, name: alt, widget: string }],
                      },
                    ],
                  },
                ],
            }
          - {
              label: 'Joining',
              name: joining,
              widget: object,
              fields:
                [
                  { label: Title, name: title, widget: string },
                  {
                    label: Benefits,
                    name: benefits,
                    widget: list,
                    fields: [
                      {
                        label: 'Image Container',
                        name: imageContainer,
                        widget: object,
                        fields: [
                          { label: Image, name: src, widget: image },
                          { label: Alt, name: alt, widget: string }
                        ],
                      },
                      { label: Title, name: title, widget: string },
                      { label: Description, name: description, widget: text },
                      { label: 'Button label', name: buttonLabel, widget: string },
                    ],
                  }
                ],
            }

          - {
              label: 'Slider Block',
              name: sliderBlock,
              widget: object,
              fields: [
                {label: 'Background Image', name: backgroundImage, widget: image},
                {
                  label: Slides,
                  name: slides,
                  widget: list,
                  fields: [
                    {
                      label: 'Image Container (3 : 2)',
                      name: imageContainer,
                      widget: object,
                      fields: [
                      { label: Image, name: src, widget: image },
                      { label: Alt, name: alt, widget: string }
                      ],
                    },
                    { label: Title, name: title, widget: string },
                    { label: Description, name: description, widget: text },
                  ],
                }
              ]
            }

          - {
              label: 'Join community Block',
              name: joinCommunity,
              widget: object,
              fields:
                [
                  { label: Title, name: title, widget: string },
                  { label: Description, name: description, widget: text },
                  { label: 'Button label', name: buttonLabel, widget: string },
                  {
                    label: 'Background image',
                    name: backgroundImage,
                    widget: image,
                  },
                ],
            }
          - {
              label: 'Learning has never been easier',
              name: learning,
              widget: object,
              fields:
                [
                  { label: Title, name: title, widget: string },
                  {
                    label: 'Image Container',
                    name: imageContainer,
                    widget: object,
                    fields: [
                      { label: Image, name: src, widget: image },
                      { label: Alt, name: alt, widget: string }
                    ],
                  },
                  {
                    label: 'Lists',
                    name: lists,
                    widget: list,
                    fields: [
                      { label: Title, name: title, widget: string },
                      {
                        label: Items,
                        name: items,
                        widget: list,
                        field: {
                          label: Item,
                          name: item,
                          widget: string
                        }
                      },
                    ],
                  },
                ],
            }
          - {
              label: JoinForFree,
              name: joinForFree,
              widget: object,
              fields:
                [
                  { label: Title, name: title, widget: string },
                  { label: Description, name: description, widget: text },
                  { label: 'Button label', name: buttonLabel, widget: string },
                  {
                    label: 'Background image',
                    name: backgroundImage,
                    widget: image,
                  },
                ],
            }
      - file: 'src/pages/about/index.md'
        label: 'About'
        name: 'about'
        fields:
          - { label: 'Template Key', name: 'templateKey', widget: 'hidden', default: 'about-page' }
          - { label: 'Title', name: 'title', widget: 'string' }
          - { label: 'Body', name: 'body', widget: 'markdown' }


Can you help to understand what is an issue?

Most helpful comment

@barthc @erquhart Thanks! Everything is working fine now, no undefined requests anymore!

All 6 comments

@barthc do you have any ideas why this could happen? Were you able to reproduce?

@mushkin-v Yes, I was able to reproduce the issue. I am working on a proper fix for it. Just hold.

@barthc @erezrokah Hi guys, I updated my CMS to the latest version:
netlify-cms-app 2.11.14
netlify-cms-core 2.17.0

But I still can reproduce this issue:
https://monosnap.com/file/G4Sgu7pnIR1wnOSRzLHW3YIG5sL1Pn
https://monosnap.com/file/SDbXgrDBU5tok0q5YMbUo5n8XLZQho

Any ideas what could be the reason?

@mushkin-v the fix still needs to be released.

Sent with GitHawk

@erquhart sorry, make sense. When can I expect a release of it?

@barthc @erquhart Thanks! Everything is working fine now, no undefined requests anymore!

Was this page helpful?
0 / 5 - 0 ratings