Skip template edit for empty posts in non-transient edits#70706
Skip template edit for empty posts in non-transient edits#70706BugReportOnWeb wants to merge 5 commits intoWordPress:trunkfrom
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. |
|
Warning: Type of PR label mismatch To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.
Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task. |
1 similar comment
|
Warning: Type of PR label mismatch To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.
Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task. |
What?
Closes #56842
Prevents the post from appearing dirty when only the template is changed on an otherwise empty post (no title, content, or excerpt).
Why?
Editing or creating a template on an empty post incorrectly causes the post to appear dirty, enabling the save button. Saving then fails because there are no actual changes of substance in the post itself, just the template assignment.
How?
getEntityRecordNonTransientEditsto ignore template as a non-transient edit when the post is clean.Testing Instructions
Screenshots or screencast
Screen.Recording.2025-07-14.at.1.49.33.PM.mov