Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When reloading the page, it fails to load the backup #5470

Open
jasikpark opened this issue Jun 4, 2021 · 3 comments
Open

When reloading the page, it fails to load the backup #5470

jasikpark opened this issue Jun 4, 2021 · 3 comments

Comments

@jasikpark
Copy link

jasikpark commented Jun 4, 2021

Screen.Recording.2021-06-04.at.3.53.30.PM.mov

Describe the bug

When reloading a page that I have edited, it offers to load the backup of text that I hadn't saved yet, and then immediately replaces that text with the text that is saved.

To Reproduce

  1. Open a post
  2. add some new text to the body
  3. reload the page
  4. select "load from backup"
  5. watch the new text flash onto the screen, and then the page reloads again without the new text.

Expected behavior

I would expect the backup to work.

Screenshots

Applicable Versions:

  • Netlify CMS version: netlify-cms-app 2.15.17 netlify-cms-core 2.40.11 netlify-cms 2.10.137
  • Git provider: Github
  • OS: macOS 11
  • Browser version Firefox 89
  • Node.JS version:

CMS configuration

https://github.com/jasikpark/jasik-xyz/blob/main/static/admin/config.yml

Additional context

This could be related to using the page bundles feature w/ Hugo since I'm getting several weird bits with it.

Browser console.log
netlify-cms-app 2.15.17 index.js:25:12
netlify-cms-core 2.40.11 bootstrap.js:83:12
netlify-cms 2.10.137 index.js:27:12
 Checking for Unpublished entries API.js:765:12
TypeError: o is undefined
    previewUrlFormatter formatters.js:187
    getDeploy backend.js:954
    loadDeployPreview deploys.js:84
    Redux 2
    loadDeployPreview Editor.js:410
    componentDidMount EditorToolbar.js:441
    React 2
    unstable_runWithPriority scheduler.production.min.js:19
    React 4
    unstable_runWithPriority scheduler.production.min.js:19
    React 4
    Redux 7
    retrieveLocalBackup entries.js:604
    Redux 2
    componentDidMount Editor.js:239
    React 2
    unstable_runWithPriority scheduler.production.min.js:19
    React 4
    unstable_runWithPriority scheduler.production.min.js:19
    React 4
    Redux 7
    loginUser auth.js:110
    promise callback*t.loginUser/< auth.js:105
    Redux 2
    handleLogin App.js:153
    componentDidMount AuthenticationPage.js:161
    React 2
    unstable_runWithPriority scheduler.production.min.js:19
    React 4
    unstable_runWithPriority scheduler.production.min.js:19
    React 4
    Redux 7
    loadConfig config.js:574
    r Redux
    _ bootstrap.js:116
     index.js:10
    Webpack 5
react_devtools_backend.js:2560:23
TypeError: o is undefined
    previewUrlFormatter formatters.js:187
    getDeploy backend.js:954
    loadDeployPreview deploys.js:84
    Redux 2
    loadDeployPreview Editor.js:410
    componentDidMount EditorToolbar.js:441
    React 2
    unstable_runWithPriority scheduler.production.min.js:19
    React 4
    unstable_runWithPriority scheduler.production.min.js:19
    React 4
    Redux 7
    k editorialWorkflow.js:308
    r Redux
    loadEntry withWorkflow.js:66
    componentDidMount Editor.js:244
    React 2
    unstable_runWithPriority scheduler.production.min.js:19
    React 4
    unstable_runWithPriority scheduler.production.min.js:19
    React 4
    Redux 7
    loginUser auth.js:110
    promise callback*t.loginUser/< auth.js:105
    Redux 2
    handleLogin App.js:153
    componentDidMount AuthenticationPage.js:161
    React 2
    unstable_runWithPriority scheduler.production.min.js:19
    React 4
    unstable_runWithPriority scheduler.production.min.js:19
    React 4
    Redux 7
    loadConfig config.js:574
    r Redux
    _ bootstrap.js:116
     index.js:10
    Webpack 5
react_devtools_backend.js:2560:23
@jasikpark jasikpark added the type: bug code to address defects in shipped code label Jun 4, 2021
@jasikpark
Copy link
Author

It seems like this could be connected to the fact that setting path: "{{slug}}/index renders preview URLs as /{{slug}}-index, since it seems to be naively escaped?

@ottworks
Copy link

I'm also experiencing this after enabling editorial workflow. Path is unspecified in my config. netlify-cms-app@2.15.72 netlify-cms-core@2.55.2

@stale
Copy link

stale bot commented Apr 26, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the status: stale label Apr 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants