Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autosave errors out on custom post type that don't support revisions #7348

Closed
jonathanbardo opened this issue Jun 18, 2018 · 3 comments
Closed
Labels
[Feature] Saving Related to saving functionality [Type] Bug An existing feature does not function as intended
Milestone

Comments

@jonathanbardo
Copy link

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
@aduth aduth added [Type] Bug An existing feature does not function as intended [Feature] Saving Related to saving functionality labels Jun 18, 2018
@aduth
Copy link
Member

aduth commented Jun 18, 2018

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?)

@danielbachhuber
Copy link
Member

Related #7442

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

@adamsilverstein
Copy link
Member

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

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 [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants