From 161e95f08a97d3bac348e4d87a2a90d7f0c5ca54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Fr=C3=A9mont?= Date: Mon, 23 Dec 2024 08:57:02 +0100 Subject: [PATCH] Fix form when we do not use any resource factory --- .../templates/shared/crud/common/content/form.html.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BootstrapAdminUi/templates/shared/crud/common/content/form.html.twig b/src/BootstrapAdminUi/templates/shared/crud/common/content/form.html.twig index 0a2dc286..2b838019 100644 --- a/src/BootstrapAdminUi/templates/shared/crud/common/content/form.html.twig +++ b/src/BootstrapAdminUi/templates/shared/crud/common/content/form.html.twig @@ -3,7 +3,7 @@ {% endif %} {% if resource is not defined %} - {% set resource = hookable_metadata.context.resource %} + {% set resource = hookable_metadata.context.resource|default(null) %} {% endif %} {% form_theme form '@SyliusBootstrapAdminUi/shared/form_theme.html.twig' %}