Gutenberg: Autosave errors out on custom post type that don't support revisions

Created on 18 Jun 2018  路  3Comments  路  Source: WordPress/gutenberg

Describe the bug
When editing a custom post type that doesn't support revisions, autosaving is triggered hits a 404 since the REST endpoint autosave doesn't exist.

To Reproduce
Steps to reproduce the behavior:

  1. Create a custom post type without revisions support
  2. Create a new post on this custom post type
  3. Write a few lines to trigger autosaving
  4. See red banner error and 404 in network console.

Expected behavior
I would have expected the autosave not to happen if the custom post type doesn't support revisions.

Additional context

  • Gutenberg v3.0.1
[Feature] Saving [Type] Bug

All 3 comments

I would have expected the autosave not to happen if the custom post type doesn't support revisions.

Within this, it may be good to clarify:

  • Should there be no delayed save whatsoever for these post types (i.e. only explicit "Save" actions from the user)
  • How is previewing expected to work, particularly for published posts? (How does it work in the Classic Editor?)

Related #7442

I'm thinking that maybe autosaves should _always_ exist, not just on post types that support revisions.

In the classic editor, autosaves continue to work regardless of whether the post type supports revisions. Turning off revisions, explicitly still allows for a single autosave revision (per user), see https://codex.wordpress.org/Revisions#Revision_Options

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ellatrix picture ellatrix  路  3Comments

spocke picture spocke  路  3Comments

BE-Webdesign picture BE-Webdesign  路  3Comments

franz-josef-kaiser picture franz-josef-kaiser  路  3Comments

aduth picture aduth  路  3Comments