From a6869c6fee3ecfe22373bb57988b3579ce261f64 Mon Sep 17 00:00:00 2001 From: Oliver Klee Date: Fri, 23 Jun 2023 12:07:54 +0200 Subject: [PATCH] [BUGFIX] Skip validation where validation makes no sense (#877) When creating a new tea record in the FE, or when editing one, the tea model provided to the form is not necessarily valid (and we need to accept invalid models if the following action rejects the model due to a valiation error). --- Classes/Controller/FrontEndEditorController.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Classes/Controller/FrontEndEditorController.php b/Classes/Controller/FrontEndEditorController.php index 4ae6387..1e6ca69 100644 --- a/Classes/Controller/FrontEndEditorController.php +++ b/Classes/Controller/FrontEndEditorController.php @@ -45,6 +45,9 @@ class FrontEndEditorController extends ActionController return $this->context->getPropertyFromAspect('frontend.user', 'id'); } + /** + * @Extbase\IgnoreValidation("tea") + */ public function editAction(Tea $tea): ResponseInterface { $this->checkIfUserIsOwner($tea); @@ -73,6 +76,9 @@ class FrontEndEditorController extends ActionController return $this->redirect('index'); } + /** + * @Extbase\IgnoreValidation("tea") + */ public function newAction(?Tea $tea = null): ResponseInterface { // Note: We are using `makeInstance` here instead of `new` to allow for XCLASSing.