Do not auto save post status changes#62171
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Thanks, Nik! This reminded me of this issue - #56881. |
|
Size Change: -1 B (0%) Total Size: 1.74 MB
ℹ️ View Unchanged
|
Hm.. that's interesting and an easy change to do if we want to resolve that issue. Unfortunately I have no context at all about this logic, so I'll ping @WordPress/gutenberg-core for possible insights. I'm wondering if it had something to with the first versions of site editor that was using auto-drafts.. Having said that, I don't think this is a blocker for this PR. |
|
This is working for me 👍 |
Mamaduka
left a comment
There was a problem hiding this comment.
Definitely not a blocker. The issue can be resolved separately when we have more context around the current (auto-draft to draft) behavior.
Co-authored-by: ntsekouras <ntsekouras@git.wordpress.org> Co-authored-by: Mamaduka <mamaduka@git.wordpress.org> Co-authored-by: jameskoster <jameskoster@git.wordpress.org>
Co-authored-by: ntsekouras <ntsekouras@git.wordpress.org> Co-authored-by: Mamaduka <mamaduka@git.wordpress.org> Co-authored-by: jameskoster <jameskoster@git.wordpress.org>
What?
Found by @Mamaduka here:
With autosaves we only update very specific attributes (handled above my changes here). The exception was only for when creating a new post (initial status
auto-draft) to make the statusdraft. Previously there was no specificpost statuspanel to edit the attribute directly, so it was safe to just use the saved post status, but it seems we don't need to make that update in any other case.Steps to reproduce
window.wp.data.dispatch( 'core/editor' ).autosave().Testing Instructions