Skip to content

Published posts should autosave #4112

@adamsilverstein

Description

@adamsilverstein

Issue Overview

When editing a published post, Gutenberg should perform a periodic autosave, matching the behavior of core's wp.autosave: https://github.com/WordPress/wordpress-develop/blob/1b5554e8188f24a0b522d82a2eccb7d098b878bb/src/wp-includes/js/autosave.js#L33

Expected Behavior

When editing a published post, the editor should autosave my changes into an autosave revision, matching the behavior of the classic editor. One autosave per user should be created.

The status indicator should also be visible:

https://codex.wordpress.org/Revisions#Autosaves

Current Behavior

Published posts do not autosave.

Possible Solution

Hook in early to the save process, and call wp_create_post_autosave when autosaving.

Having autosaves may also be helpful addressing previewing changes on published posts not working.

Related Issues and/or PRs

#1773
#3656
#4099

Todos

  • Tests
  • Documentation

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions