Restore from autosave does not revert changes in pages (but story data is restored)
See original GitHub issueBug 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:
- Create a new story with 1 page
- Publish it with poster and description etc
- Add another page and move it to first position
- Update this story
- Now add a third page, change the title & wait for a min to create the autosave session key
- exit to dashboard without saving to DB
- reopen the now published & updated story
- you will get two overlays - one for restoring from local backup (dismiss this) and another for restoring from saved version …
- 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
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:
- Created a year ago
- Comments:12
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
cc @miina who worked on this
@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:
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).