Make WordPress Core

Opened 8 weeks ago

#53813 new defect (bug)

Do not provide initial_edits for properties that are not supported by the current post type.

Reported by: youknowriad Owned by:
Milestone: 5.9 Priority: normal
Severity: normal Version: 5.8
Component: Editor Keywords: good-first-bug
Focuses: Cc:


I noticed that edit-form-blocks.php (block editor initialization) always provides "title", "content" and "excerpt" initial edits in the initializeEditor call even though these properties might not be supported by the current post type being edited.

This creates a subtle bug in the post editor where as soon as you open a "new post", the editor considers the content "dirty", meaning changes are applied and you can't "leave" the editor without having the "unsaved changes" notice.

I think we should consider updating the $initial_edits variable declaration to only add the properties that are supported by the current CPT.

Change History (0)

Note: See TracTickets for help on using tickets.