Skip to content
Snippets Groups Projects
Commit 24f04c09 authored by Vladimir Roudakov's avatar Vladimir Roudakov
Browse files

Issue #3338216 by nofue, fhelms, VladimirAus, _pratik_, vishnumodi1987, nsuit:...

Issue #3338216 by nofue, fhelms, VladimirAus, _pratik_, vishnumodi1987, nsuit: Upgrade from 2.0.6 -> 2.0.8 breaks site
parent 4c34ffb7
No related branches found
Tags 5.1.1
No related merge requests found
......@@ -291,9 +291,12 @@ function bootstrap5_preprocess_media_library_item__widget(array &$variables) {
*/
function bootstrap5_preprocess_block(&$variables) {
if (isset($variables['elements']['#id'])) {
$region = Block::load($variables['elements']['#id'])->getRegion();
if (!empty($region)) {
$variables['content']['#attributes']['data-block']['region'] = $region;
$block = Block::load($variables['elements']['#id']);
if ($block) {
$region = Block::load($variables['elements']['#id'])->getRegion();
if (!empty($region)) {
$variables['content']['#attributes']['data-block']['region'] = $region;
}
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment