From 6c4527f3ef3b1f64eb0b3dcf21a33b02e3e07615 Mon Sep 17 00:00:00 2001 From: Mathieu De Keyzer Date: Thu, 5 Oct 2023 17:56:51 +0200 Subject: [PATCH] fix: no name possible --- EMS/core-bundle/src/Controller/Revision/EditController.php | 2 +- EMS/core-bundle/src/Resources/translations/EMSCoreBundle.en.yml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/EMS/core-bundle/src/Controller/Revision/EditController.php b/EMS/core-bundle/src/Controller/Revision/EditController.php index 732ea901a..bfce3e358 100644 --- a/EMS/core-bundle/src/Controller/Revision/EditController.php +++ b/EMS/core-bundle/src/Controller/Revision/EditController.php @@ -216,7 +216,7 @@ public function editRevision(int $revisionId, Request $request): Response $objectArray = $revision->getRawData(); $isValid = $this->dataService->isValid($form, null, $objectArray); if (!$isValid) { - $this->logger->warning('log.data.revision.can_finalized', LogRevisionContext::update($revision)); + $this->logger->warning($revision->hasOuuid() ? 'log.data.revision.can_finalized' : 'log.data.new-document.can_finalized', LogRevisionContext::update($revision)); } } diff --git a/EMS/core-bundle/src/Resources/translations/EMSCoreBundle.en.yml b/EMS/core-bundle/src/Resources/translations/EMSCoreBundle.en.yml index fe17b47d6..32d71cf35 100644 --- a/EMS/core-bundle/src/Resources/translations/EMSCoreBundle.en.yml +++ b/EMS/core-bundle/src/Resources/translations/EMSCoreBundle.en.yml @@ -102,6 +102,8 @@ log: initialize_failed: 'A job "%template_label%" has failed in the environment %environment%' initialized: 'A job "%template_label%" has been initialized in the environment %environment%' started: 'A job "%template_label%" has been started in the environment %environment%' + new-document: + can_finalized: 'This new document can''t be saved as it is' revision: add_from_json_error: 'It was not possible to initiate a new %contenttype% document due to an internal error' ajax_update_on_finalized: 'It''s impossible to save the document "%label%" has this revision is already saved'