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.

Restore from autosave does not revert changes in pages (but story data is restored)

See original GitHub issue

Bug Description

Restoring an autosaved webstory that is different from the local version does not work in reverting changes to pages. However, a change in the story data (like title) is reverted !

Expected Behaviour

Steps to Reproduce

The following steps consistently reproduce the problem:

  1. Create a new story with 1 page
  2. Publish it with poster and description etc
  3. Add another page and move it to first position
  4. Update this story
  5. Now add a third page, change the title & wait for a min to create the autosave session key
  6. exit to dashboard without saving to DB
  7. reopen the now published & updated story
  8. you will get two overlays - one for restoring from local backup (dismiss this) and another for restoring from saved version …
  9. Here, view the different versions and restore the latest (3 slides)

ISSUE: the version with 2 slides is restored instead of the last saved version

Screenshots

image.png

image.png

Additional Context

This issue was observed in #12521 as well.

  • Plugin Version: main branch as of 10/25/2022
  • WordPress Version: 6.0.3
  • Operating System: Win10
  • Browser: Chrome

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:12

github_iconTop GitHub Comments

1reaction
swissspidycommented, Oct 31, 2022

cc @miina who worked on this

1reaction
kkalarickalcommented, Oct 26, 2022

@swissspidy - regarding the two dialogs … Comparing the way autosave/local-backup behaves for WP Post with how its implemented in web stories, it appears that after local changes are made to a draft, if the user exits the editor:

  • in the WP post case, the changes are saved to disk and the local-session backup is deleted
  • in the WebStories case, the changes are saved to disk but the local-session backup is retained

This is ok so long as the story is not published. Because after published status, the changes made after autosave are not written to db when exiting the editor. So now there is a legitimate difference between the local-session backup and the story in db which is why we have two dialogs (correctly).

image

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Recover Previous Versions of Pages, Word, and Other ...
Select the version you want to recover, then click the Restore button. You can even restore deleted files from iCloud in case you...
Read more >
How to Recover Unsaved/Deleted Word Document in 2022?
There are two options: recover a saved file or an unsaved one. You can also compare AutoRecover versions by choosing "Compare" instead of...
Read more >
Troubleshooting lost content - Squarespace Help Center
When content can't be restored. Squarespace doesn't have auto-save or revision history features when editing, so content lost or deleted in the ...
Read more >
Auto Save and Versions: An Often Overlooked Mac Feature
To create a copy, hold down the Option key; the Restore button will change to Restore a Copy. Tip within a tip: Documents...
Read more >
What IT administrators should know about AutoSave
AutoSave is enabled when a file is stored on OneDrive, OneDrive for work or school, or SharePoint in Microsoft 365. It automatically saves...
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