Save As button not displayed with custom post_status #63161
Labels
[Feature] Saving
Related to saving functionality
[Status] In Progress
Tracking issues with work in progress
[Type] Bug
An existing feature does not function as intended
Description
The Save As button (button.editor-post-save-draft) is not displayed if the post is saved with a custom non-published status. As a result, if third party code uses register_post_status() to define a custom post status, posts of that status cannot be updated without publishing.
This issue does not exist in Gutenberg 17.7 and earlier.
Step-by-step reproduction instructions
Open the sample post "Status Test" in Gutenberg.
Key in some post content.
Expected behavior:
Gutenberg displays the Save Draft button.
Clicking the Save Draft button causes post content changes to be saved, while retaining the custom post status.
The Posts screen still lists "Sample Post" and the status count caption "Testing" is still visible next to All / Mine / Published / Drafts.
Note that this is not expected to be a finished use case, just a functional Save As button which third party code can build on. It works as such with Gutenberg 17.7 and WordPress 6.5.
Screenshots, screen recording, code snippet
Sample Post saved with custom post status (indicated by status count caption though not in table row):
.
Save Draft button displayed in Gutenberg 17.7:
.
Save Draft button missing in Gutenberg 18.7:
Environment info
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: