decaporg / decaporg/decap-cms

View Preview link is missing for any new post created in Workflow

Open
#6,490 1 comment 0 reactions 0 assignees View on GitHub
area: ui/editorial-workflow type: bug
Dominant language
JavaScript
Stars
19.4k
Forks
3.1k
Avg merge
1d 14h
Merged PRs (30d)
9

Description

**Describe the bug**
The "View Preview" link is missing in CMS for any new post created in Workflow.

**To Reproduce**
1. Go to the CMS and click on workflow in the nav bar
2. Click on "New Post", fill out the required fields and click on "Save"
3. After the entry is saved the "View Preview" link is missing, should be to the left of "Set Status" in the nav bar

**Expected behavior**
After creating an entry on Workflow a "View Preview" link should appear to the left of "Set Status" in the nav bar. This preview link helps to view live content when it has not been published

**Screenshots**
![ExpectedBehaviour](https://user-images.githubusercontent.com/48397040/173105351-b1ec22a7-cce0-4af4-be48-7ee960b5e354.png)
![PreviewLinkMissing](https://user-images.githubusercontent.com/48397040/173105375-28771ce2-53b9-4fe3-be2f-039c054415e3.png)

**Applicable Versions:**
- Netlify CMS version: 2.12.19
- Git provider: GitLab
- OS: macOS Monterey
- Browser version: chrome 102
- netlify-cms-app: 2.12.19
- gatsby-plugin-netlify-cms: 4.2.1
- Node.JS version: 10.21

**CMS configuration**
Configured with package netlify-cms-app
const initCMS = (collections) => {
CMS.init({
config: {
backend: {
name: 'git-gateway',
branch: process.env.GATSBY_CMS_BRANCH,
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',
local_backend: true,
load_config_file: false,
media_folder: 'static/img',
show_preview_links: true,
public_folder: '/img',
collections,
},
})
}

**Additional context**
The preview link still works for older entries, and suddenly stopped working for new entries. We already updated the access token in GitLab but didn't worked.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.