-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Editor: Disable autosaving for Template Parts #64733
Conversation
Size Change: +3 B (0%) Total Size: 1.78 MB
ℹ️ View Unchanged
|
Are we tracking this somewhere so we don‘t forget? |
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. |
I'll create a separate issue. Did we ship the corresponding PHP code in core? I think autosaves and both post types will support revisions at some point in the future. |
Unless I misread the core PR/ticket, the changes in WP 6.6 only covered Font-related post types. Templates and Template Parts will need special handling, as both declare support for See: |
Well, then need to explicitly call |
@swissspidy, what would be the best place to handle this in Core? Should we remove support directly in |
In |
8316329
to
f67a1a7
Compare
This is ready for final review. Related:
|
@Mamaduka If the only reason to disable autosaving is this warning message, I propose waiting until the core fix is merged rather than disabling autosaving (fixing these endpoints shouldn't take long). I'm working on the fix. This bug wasn't discovered earlier because unit tests didn't catch it. The unit tests were written for templates but not for template parts, as it was assumed they would behave similarly :(. |
@anton-vlasenko, I thought autosaves never worked for these post types because of hardcoded values in the store. Of course, fixing the original bug is more preferred than disabling the autosaves feature. |
So should we work towards enabling autosaves then rather than disabling? :) |
@swissspidy, you said it better :) |
Closing in favor of WordPress/wordpress-develop#7272. |
What?
PR disables autosaving for the Template Parts entity. Hardcoding this logic shouldn't be necessary after the minimum required version is bumped to WP 6.6. See #61622 (comment).
Why?
Currently, autosaving isn't supported for Templates and Template parts. Related actions cause failed requests or PHP warnings.
Testing Instructions
debug.log
.Testing Instructions for Keyboard
Same.
Screenshots or screencast