You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When content has been modified in a post after saving, the "There is an autosave of this post that is more recent than the version below" notice appears for all users:
Reproduction
Join a post with two users in RTC.
Add content and save.
After saving, add more content but do not save.
Wait for any user's /autosave request to fire.
Refresh the page or load the post in another tab. See the "There is an autosave of this post that is more recent than the version below" notice:
newer-autosave-repro.mov
As you can see in the reproduction above, users are warned that there's more recent content available in an autosave, but when they click into the revision, the content is the same as what's shown on the post. It's confusing.
Cause
In RTC, all user autosaves target a revision and not the actual parent post. This was done to avoid having inconsistent save behavior between the original post author and other peers in a collaborative session. After an autosave fires, WordPress detects that the latest autosave is newer than the parent post and sets an autosave flag on load. Gutenberg reads the flag and shows the more recent autosave notice. Because we're always targeting a revision until a real save happens, the autosave warning is always triggered.
It's true that the content hasn't been persisted to the parent post, which is in the spirit of the warning, but it is confusing to see the same content in an autosave as the loaded post data from the server. The notice is also annoying to always see when entering an in-progress document. We should reconsider the logic we use in RTC when we're showing it.
See related discussion in #79911 (comment) and bug #79591, which addressed blank revisions but do not fix the notice problem directly.
When content has been modified in a post after saving, the "There is an autosave of this post that is more recent than the version below" notice appears for all users:
Reproduction
/autosaverequest to fire.newer-autosave-repro.mov
As you can see in the reproduction above, users are warned that there's more recent content available in an autosave, but when they click into the revision, the content is the same as what's shown on the post. It's confusing.
Cause
In RTC, all user autosaves target a revision and not the actual parent post. This was done to avoid having inconsistent save behavior between the original post author and other peers in a collaborative session. After an autosave fires, WordPress detects that the latest autosave is newer than the parent post and sets an
autosaveflag on load. Gutenberg reads the flag and shows the more recent autosave notice. Because we're always targeting a revision until a real save happens, the autosave warning is always triggered.It's true that the content hasn't been persisted to the parent post, which is in the spirit of the warning, but it is confusing to see the same content in an autosave as the loaded post data from the server. The notice is also annoying to always see when entering an in-progress document. We should reconsider the logic we use in RTC when we're showing it.
See related discussion in #79911 (comment) and bug #79591, which addressed blank revisions but do not fix the notice problem directly.