Block transformation is not working due to canInsertBlockType is returning false. #46740
Labels
[Feature] Blocks
Overall functionality of blocks
[Type] Regression
Related to a regression in the latest release
Description
I'm trying to do custom code so I can transform one block to another block automatically on post load.
In my case, I enabled
core/legacy-widget
for post editor and auto transformation will find here.https://gist.github.com/dipeshkakadiya/6f18792be4d7c170eb6c71cc63e4d713
On replaceBlocks, canInsertBlockType is returning false. If I'm trying to manually transformation then canInsertBlockType return Ture.
Above issue occure with WordPress version 6.1. With WordPress 6.0 it was working fine.
Step-by-step reproduction instructions
Use blow script to transform one block to another block.
https://gist.github.com/dipeshkakadiya/6f18792be4d7c170eb6c71cc63e4d713
Screenshots, screen recording, code snippet
Auto Transformation on Page load
Manual Transformation
Environment info
WordPress Version : 6.1
browser : Chrome
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
The text was updated successfully, but these errors were encountered: