Commit c5ad8275 authored by git's avatar git Committed by paulocs

Issue #3073087 by DeaOm, paulocs, malcolm_p: Messages block can be duplicated...

Issue #3073087 by DeaOm, paulocs, malcolm_p: Messages block can be duplicated when including blocks from default block layout
parent f75faea5
......@@ -131,6 +131,13 @@ class ContextBlockPageVariant extends VariantBase implements PageVariantInterfac
break;
}
}
// Remove systems messages block if it's added via context.
foreach ($build as $item => $block) {
if (array_key_exists('system_messages_block', $block)) {
unset($build['content']['messages']);
break;
}
}
return $build;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment