From 69f50d3369ce0dd6f9925e124bffc1ac8955009e Mon Sep 17 00:00:00 2001 From: oallain Date: Wed, 22 Nov 2023 18:17:54 +0100 Subject: [PATCH] Fix form error --- src/Controller/MediaController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Controller/MediaController.php b/src/Controller/MediaController.php index bce62db51..112dc19d5 100755 --- a/src/Controller/MediaController.php +++ b/src/Controller/MediaController.php @@ -85,7 +85,7 @@ public function previewAction(Request $request): Response $form->handleRequest($request); - if ($form->isValid()) { + if ($form->isSubmitted() && $form->isValid()) { $this->setMediaLocales($media, $request); $this->setMediaPathIfExists($media); $mediaTemplate = $this->mediaProviderResolver->resolveProvider($media)->getTemplate();