diff --git a/packages/netlify-cms-core/src/actions/editorialWorkflow.ts b/packages/netlify-cms-core/src/actions/editorialWorkflow.ts index 312fd339..0fe730ac 100644 --- a/packages/netlify-cms-core/src/actions/editorialWorkflow.ts +++ b/packages/netlify-cms-core/src/actions/editorialWorkflow.ts @@ -406,6 +406,7 @@ export function persistUnpublishedEntry(collection: Collection, existingUnpublis }), ); dispatch(unpublishedEntryPersisted(collection, transactionID, newSlug)); + if (!existingUnpublishedEntry) return dispatch(loadUnpublishedEntry(collection, newSlug)); } catch (error) { dispatch( notifSend({ diff --git a/packages/netlify-cms-core/src/actions/entries.ts b/packages/netlify-cms-core/src/actions/entries.ts index 6bbdede5..8a73b1c5 100644 --- a/packages/netlify-cms-core/src/actions/entries.ts +++ b/packages/netlify-cms-core/src/actions/entries.ts @@ -762,6 +762,7 @@ export function persistEntry(collection: Collection) { dispatch(loadMedia()); } dispatch(entryPersisted(collection, serializedEntry, slug)); + if (serializedEntry.get('newRecord')) return dispatch(loadEntry(collection, slug)); }) .catch((error: Error) => { console.error(error); diff --git a/packages/netlify-cms-core/src/components/Editor/Editor.js b/packages/netlify-cms-core/src/components/Editor/Editor.js index f11f8bb0..dc54f83b 100644 --- a/packages/netlify-cms-core/src/components/Editor/Editor.js +++ b/packages/netlify-cms-core/src/components/Editor/Editor.js @@ -177,7 +177,6 @@ export class Editor extends React.Component { const newSlug = this.props.entryDraft && this.props.entryDraft.getIn(['entry', 'slug']); if (!prevProps.slug && newSlug && this.props.newEntry) { navigateToEntry(prevProps.collection.get('name'), newSlug); - this.props.loadEntry(this.props.collection, newSlug); } if (!prevProps.localBackup && this.props.localBackup) {