Saving: Post with only "Classic" block fails to autosave #7727
Labels
[Feature] Saving
Related to saving functionality
[Type] Bug
An existing feature does not function as intended
When a post only contains a "Classic" block, it attempts to autosave but fails.
Steps to reproduce:
Suspected cause:
There is special handling for the classic block to omit its comment demarcation wrapper, so while the editor knows that a block exists and thus thinks the post is saveable, when it's the only content, it will be serialized as the empty string, which is not valid for save.
gutenberg/blocks/api/serializer.js
Lines 274 to 287 in 622bbfb
gutenberg/editor/store/selectors.js
Lines 351 to 364 in 622bbfb
It is not a safe assumption to imply that the presence of blocks means that content is non-empty.
isEditedPostEmpty
should at least be updated to account for this special Classic block behavior.The text was updated successfully, but these errors were encountered: