diff --git a/core/lib/Drupal/Core/Entity/Entity/EntityViewDisplay.php b/core/lib/Drupal/Core/Entity/Entity/EntityViewDisplay.php index 57041e9..51a0c0d 100644 --- a/core/lib/Drupal/Core/Entity/Entity/EntityViewDisplay.php +++ b/core/lib/Drupal/Core/Entity/Entity/EntityViewDisplay.php @@ -109,7 +109,9 @@ public static function collectRenderDisplays($entities, $view_mode) { foreach ($bundles as $bundle) { // Use the selected display if any, or create a fresh runtime object. if (isset($load_ids[$bundle])) { - $display = $displays[$load_ids[$bundle]]; + // The display might be altered during the request, clone to so that + // those changes will not affect anything else. + $display = clone $displays[$load_ids[$bundle]]; } else { $display = $storage->create(array(