diff --git a/this_block_is_broken_or_missing-2918149-16_0.patch b/this_block_is_broken_or_missing-2918149-16_0.patch index b29dfd8582..7ca27d85d7 100644 --- a/this_block_is_broken_or_missing-2918149-16_0.patch +++ b/this_block_is_broken_or_missing-2918149-16_0.patch @@ -1,18 +1,17 @@ diff --git a/core/lib/Drupal/Core/Block/Plugin/Block/Broken.php b/core/lib/Drupal/Core/Block/Plugin/Block/Broken.php -index b7f3a19..821aa2c 100644 +index b7f3a19fff..4ac255a0fc 100644 --- a/core/lib/Drupal/Core/Block/Plugin/Block/Broken.php +++ b/core/lib/Drupal/Core/Block/Plugin/Block/Broken.php -@@ -20,7 +20,13 @@ class Broken extends BlockBase { +@@ -20,7 +20,12 @@ class Broken extends BlockBase { * {@inheritdoc} */ public function build() { - return $this->brokenMessage(); -+ trigger_error($this->t('The block %label is broken or missing. You may be missing content or you might need to enable the original module.', ['%label' => $this->label()]), E_USER_ERROR); -+ $build= []; -+ if (\Drupal::currentUser()->hasPermission('administer blocks')) { ++ $build = []; ++ $build['#cache']['contexts'] = ['user.roles']; ++ if (\Drupal::currentUser()->hasPermission('administer blocks')) { + $build += $this->brokenMessage(); -+ } -+ ++ } + return $build; }