Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
State: Avoid URL redirect for published post autosave #7067
This pull request seeks to resolve an issue where the editor URL is replaced with an autosave ID when autosaves occur for published posts. Since autosave posts are not directly editable, this results in an error message if the user proceeds to reload the page.
As part of some consolidation refactoring in #6257, I made assumptions about an autosave success result receiving a post object, which is only partly correct. In fact, the autosave endpoints return a subset of post properties. Notably, this does not include some properties like
This change was intended to be the minimal fix to allow a 3.0 release to proceed, but I'd like to proceed with future refactorings of this behavior in subsequent pull requests, both:
Repeat steps to reproduce from #7066, verifying that no error screen is presented, and that the browser URL does not change after an autosave occurs for a published post.
Ensure unit tests pass: