question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Editorial workflow] Failed to load entry: API_ERROR

See original GitHub issue

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 

Screenshot of them: https://monosnap.com/file/nvmcrsA01HPikHaeYfTRQKFVNzgIrp

It is very strange because of “undefined” in the request URL. I thought the issue is maybe because I am using branch: ‘test’, but then I checked on the ‘master’ branch and I have the same issue. When no draft saved edits I don’t see such requests and any errors. Also when I am turning off editorial_workflow everything is working fine. I have another page(“about” page where I have only Title and body), for it, editorial_workflow works fine. Config.yml for index and about pages you can find below.

Applicable Versions:

  • Netlify CMS version: netlify-cms-app 2.11.5, netlify-cms-core 2.15.2
  • Git provider: BitBucket
  • OS: MAC (project is deployed to Amazon S3)
  • Browser version: chrome Version 79.0.3945.130 (Official Build) (64-bit)

CMS configuration Manual init is turned on. in CMS.js:

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

In config.yml:

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?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
mushkin-vcommented, Feb 12, 2020

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

1reaction
barthccommented, Feb 5, 2020

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Common Issue] Netlify CMS API_ERROR. Now what?
Failed to persist entry: API_ERROR: Reference update failed. You're using the editorial workflow but already have a branch called cms .
Read more >
Provide context for API error messages · Issue #2827 - GitHub
Failed to persist entry: API_ERROR: Reference update failed. You're using the editorial workflow but already have a branch called cms .
Read more >
NetlifyCMS Editorial Workflow: Failed to persist entry: TypeError
I'm using Gatsby.js + Netlify CMS for my personal blog. Yesterday, I enabled Editorial Workflow on my blog by following this link, ...
Read more >
CloudBees CD/RO API error messages
The CloudBees CD/RO server cannot start, or the system cannot start a job, workflow, or steps. NoStateDefinitions. There are no state definitions. NoSuchAcl....
Read more >
API error codes - IBM Quantum
Error during the validation process of a job. Retry the action. ... Error publishing job at the backend queue. ... Invalid URL to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found