Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save timplunkett/7fd67d16f1edb4957fafb01c284fb3dd to your computer and use it in GitHub Desktop.
Save timplunkett/7fd67d16f1edb4957fafb01c284fb3dd to your computer and use it in GitHub Desktop.
diff --git a/core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php b/core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php
index 6619c580ce..9c605bff01 100644
--- a/core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php
+++ b/core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php
@@ -267,7 +267,7 @@ public function buildMultiple(array $entities) {
foreach ($build_list[$id] as $name => $build_part) {
$field_definition = $this->getFieldDefinition($name);
if ($field_definition && $field_definition->isDisplayConfigurable($this->displayContext)) {
- unset($build_list[$id][$name]);
+ $build_list[$id][$name]['#access'] = FALSE;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment