diff --git a/core/modules/block/block.install b/core/modules/block/block.install
index e165f91..5e72ac2 100644
--- a/core/modules/block/block.install
+++ b/core/modules/block/block.install
@@ -119,11 +119,11 @@ function block_update_8002() {
$message = \Drupal::translation()
->translate('Encountered a context mapping key coming probably from a contributed or custom module: One or more mappings could not be updated. Please manually review your visibility settings for the following blocks, which are disabled now:');
$message .= '
';
- foreach ($blocks as $disabled_block_id => $disabled_block_label) {
+ foreach ($blocks as $disabled_block_id => $disabled_block) {
$message .= '- ' . Drupal::translation()
->translate('@label (Visibility: @plugin_ids)', [
- '@label' => $disabled_block_label,
- '@plugin_ids' => implode(', ', $block_update_8001[$disabled_block_id])
+ '@label' => $disabled_block->label(),
+ '@plugin_ids' => implode(', ', $block_update_8001[$disabled_block_id]['missing_context_ids'])
]) . '
';
}
$message .= '
';
diff --git a/core/modules/block/src/Tests/Update/BlockContextMappingUpdateTest.php b/core/modules/block/src/Tests/Update/BlockContextMappingUpdateTest.php
index c3de576..9bad422 100644
--- a/core/modules/block/src/Tests/Update/BlockContextMappingUpdateTest.php
+++ b/core/modules/block/src/Tests/Update/BlockContextMappingUpdateTest.php
@@ -36,7 +36,7 @@ protected function setUp() {
*/
public function testUpdateHookN() {
$this->runUpdates();
- $this->assertRaw('Encountered a context mapping key coming probably from a contributed or custom module: One or more mappings could not be updated. Please manually review your visibility settings for the following blocks, which are disabled now:- User login (Visibility: Content types)
');
+ $this->assertRaw('Encountered a context mapping key coming probably from a contributed or custom module: One or more mappings could not be updated. Please manually review your visibility settings for the following blocks, which are disabled now:- User login (Visibility: baloney.spam)
');
// Disable maintenance mode.
\Drupal::state()->set('system.maintenance_mode', FALSE);