Reusable Block in template becomes invalid after save #15542
Labels
[Block] Block
The "Reusable Block" Block
[Feature] Templates API
Related to API powering block template functionality in the Site Editor
Describe the bug
A reusable block added via a template appears fine at first but becomes invalid after save
To reproduce
Steps to reproduce the behavior:
1.Add a reusable block to a template as follows:
‘template’ => array(
array( ‘core/block’, array(
‘ref’ => ‘547’,
) ),
2. In the dashboard, create a new instance of a custom post type via "add new"
3. Notice the reusable block appears in the editor.
4. Preview the post and notice the usable block appears in the front end
5. save the post as a draft or publish
6. Refresh the browser
7. Notice the reusable block is no longer present and is replaced by the message:
"Block has been deleted or is unavailable."
Note: The reusable block can still be manually added to the post and will work fine.
Screen shot
Expected behavior
The reusable block should be saved with the post and re-appear
Desktop (please complete the following information):
Additional context
I am using WordPress 5.2
The text was updated successfully, but these errors were encountered: