-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Custom post type lock breaks block recovery #49005
Copy link
Copy link
Open
Labels
[Feature] Block LockingThe API allowing for the ability to lock/unlock blocksThe API allowing for the ability to lock/unlock blocks[Feature] Block Validation/DeprecationHandling block validation to determine accuracy and deprecationHandling block validation to determine accuracy and deprecation[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
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
- Create a custom post type with a template
core/group - Add
template_lock: 'insert' - Create new custom post type and add a paragraph or whatever
- In the code editor change markup of
core/groupaddin something likedata-foo="bar" - The block is invalid.
- 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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
[Feature] Block LockingThe API allowing for the ability to lock/unlock blocksThe API allowing for the ability to lock/unlock blocks[Feature] Block Validation/DeprecationHandling block validation to determine accuracy and deprecationHandling block validation to determine accuracy and deprecation[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Type
Fields
Give feedbackNo fields configured for issues without a type.