Closed vonloxx closed 5 years ago
Ok! Found the issue. Some extra properties are needed when fetching the reusable block. Here's what I'm using now:
'id' => (int) $block->id(),
'title' => ['raw' => $block->info->value],
'content' => ['protected' => false, 'raw' => $block->body->value],
'type' => 'block',
'status' => 'publish',
'slug' => 'reusable_block_' . $block->id(),
Ahoy! Something strange happening with reusable blocks. I added a reusable block from a selection of blocks and it created without problems but when loading the page again it shows a message: Block has been deleted or is unavailable. Tested with G-editor and Drupal Gutenberg.