hook_update_8001 is not performed if block is 'Broken/Missing' or layout_builder_browser_block is trying to be created with id that already exist.

Created on 23 February 2022, about 3 years ago
Updated 23 March 2023, about 2 years ago

I've faced with 2 errors in layout_builder_browser_update_8001 when tried drush updb
1. If entity layout_builder_browser_block create with id that already exist

$lBlock = $lBBlockStorage->create([
  'id' => $lBBlockEntityId,
...

For example, you have entity layout_builder_browser_block with id some_awesome_layout_builder_b_b.
In such case you will have an error that entity with id some_awesome_layout_builder_b_b already exists and layout_builder_browser_update_8001 will be failed.

2. If your system has 'Broken/Missing' blocks.
In such case you will have an error in this part of code

$blockdefinition = \Drupal::service('plugin.manager.block')
  ->getDefinition($config_block['block_id']);

Because definition of broken blocks cannot be obtained.

πŸ› Bug report
Status

Fixed

Version

1.4

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine oleksandr.s

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024