diff --git a/src/Resources/views/BlockAdmin/compose_preview.html.twig b/src/Resources/views/BlockAdmin/compose_preview.html.twig
index 68c8eeb2a..aa21d14a3 100644
--- a/src/Resources/views/BlockAdmin/compose_preview.html.twig
+++ b/src/Resources/views/BlockAdmin/compose_preview.html.twig
@@ -7,25 +7,29 @@
- {% set service = attribute(blockServices, child.type) %}
- {% if service.metadata is defined %}
- {% set metadata = service.metadata %}
+ {% set service = attribute(blockServices, child.type) ?? null %}
+ {% if service is not null %}
+ {% if service.metadata is defined %}
+ {% set metadata = service.metadata %}
+ {% else %}
+ {% set metadata = service.blockMetadata %}
+ {% endif %}
+
+ {{ child.name|default(metadata.title)|trans({}, metadata.domain|default('SonataPageBundle')) }}
+
+ {% if not metadata.image %}
+
+ {% else %}
+
+ {% endif %}
+ {{ metadata.title|trans({}, metadata.domain|default('SonataPageBundle')) }}
+
+
+
+
{% else %}
- {% set metadata = service.blockMetadata %}
+ {{ child.type }}
{% endif %}
-
- {{ child.name|default(metadata.title)|trans({}, metadata.domain|default('SonataPageBundle')) }}
-
- {% if not metadata.image %}
-
- {% else %}
-
- {% endif %}
- {{ metadata.title|trans({}, metadata.domain|default('SonataPageBundle')) }}
-
-
-
-