Skip to content

Conversation

@danielbachhuber
Copy link
Member

Description

Ensures the autosaves controller is always registered for post types with show_in_rest=>true. While revisions can be enabled/disabled on a post type by post type basis, the editor expects that a post type can always be autosaved.

Fixes #7442
Fixes #7348

How has this been tested?

  1. Disable revisions for the Post post type:
add_action( 'init', function(){
	remove_post_type_support( 'post', 'revisions' );
});
  1. In the Gutenberg editor, create a new Post, enter a title, and hit "Preview". You should see the preview of the post display.

Types of changes

Bug fix (non-breaking change which fixes an issue).

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.

Post types always support autosaves, even when they don't support
revisions.
@danielbachhuber danielbachhuber added [Type] Bug An existing feature does not function as intended REST API Interaction Related to REST API [Feature] Saving Related to saving functionality labels Aug 7, 2018
@danielbachhuber danielbachhuber added this to the 3.5 milestone Aug 7, 2018
@danielbachhuber danielbachhuber requested a review from a team August 7, 2018 21:29
@danielbachhuber
Copy link
Member Author

@adamsilverstein beat me to it in #8682

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] Saving Related to saving functionality REST API Interaction Related to REST API [Type] Bug An existing feature does not function as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Preview doesn't work when revisions are turned off Autosave errors out on custom post type that don't support revisions

2 participants