Skip to content

Custom post type lock breaks block recovery #49005

Open
@Tropicalista

Description

Description

Adding a template lock can break the block recovery.

This line prevent block recovery:

const isLocked = !! getTemplateLock( state, rootClientId );

Step-by-step reproduction instructions

  1. Create a custom post type with a template core/group
  2. Add template_lock: 'insert'
  3. Create new custom post type and add a paragraph or whatever
  4. In the code editor change markup of core/group addin something like data-foo="bar"
  5. The block is invalid.
  6. Try to recovery block and nothing happens

Do the same steps on a normal post/page. The recovery works great if you try the recovery on a post/page.

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

Metadata

Assignees

No one assigned

    Labels

    [Feature] Block LockingThe API allowing for the ability to lock/unlock blocks[Feature] Block Validation/DeprecationHandling block validation to determine accuracy and deprecation[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions