[Editorial workflow] Failed to load entry: API_ERROR
See original GitHub issueDescribe 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:
- Created 4 years ago
- Comments:8 (2 by maintainers)
@barthc @erquhart Thanks! Everything is working fine now, no undefined requests anymore!
@mushkin-v Yes, I was able to reproduce the issue. I am working on a proper fix for it. Just hold.