Skip to content

Instantly share code, notes, and snippets.

@zanvidmar
zanvidmar / social-re-use-group-join-methods-3254715-29-zan.patch
Last active September 22, 2022 13:37
social-re-use-group-join-methods-3254715-29-zan.patch
diff --git a/composer.json b/composer.json
index dd0736126..e0c52f12f 100644
--- a/composer.json
+++ b/composer.json
@@ -140,6 +140,12 @@
},
"drupal/redirect": {
"Redirection issue when interface language is different from content language": "https://www.drupal.org/files/issues/2020-06-01/redirect-interface_language_different_from_content_language_2991423-13.patch"
+ },
+ "drupal/socialbase": {
diff --git a/core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php b/core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php
index 6619c58..9e1fe5b 100644
--- a/core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php
+++ b/core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php
@@ -300,6 +300,10 @@ protected function buildSections(FieldableEntityInterface $entity) {
if ($storage) {
foreach ($storage->getSections() as $delta => $section) {
$build[$delta] = $section->toRenderArray($contexts);
+ $build[$delta]['#view_mode'] = $this->getOriginalMode();
+ $build[$delta]['#bundle'] = $this->getTargetBundle();