From c08b49fe48ac93dbb0c22114abab9a7e5dbb1083 Mon Sep 17 00:00:00 2001 From: Tykayn Date: Fri, 27 Jun 2025 00:36:55 +0200 Subject: [PATCH] fix error when not in error for edit form --- src/Controller/AdminController.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Controller/AdminController.php b/src/Controller/AdminController.php index d00174e8..33dd81ee 100644 --- a/src/Controller/AdminController.php +++ b/src/Controller/AdminController.php @@ -336,13 +336,18 @@ final class AdminController extends AbstractController $place = $this->entityManager->getRepository(Place::class)->findOneBy(['osm_kind' => $osm_kind, 'osmId' => $osm_id]); if ($place) { - $this->actionLogger->log('ERROR_admin/placeType', ['osm_kind' => $osm_kind, 'osm_id' => $osm_id, + $this->actionLogger->log('admin/placeType', ['osm_kind' => $osm_kind, 'osm_id' => $osm_id, 'name' => $place->getName(), 'code_insee' => $place->getZipCode(), 'uuid' => $place->getUuidForUrl() ]); return $this->redirectToRoute('app_admin_commerce', ['id' => $place->getId()]); } else { + $this->actionLogger->log('ERROR_admin/placeType', ['osm_kind' => $osm_kind, 'osm_id' => $osm_id, + 'name' => $place->getName(), + 'code_insee' => $place->getZipCode(), + 'uuid' => $place->getUuidForUrl() + ]); $this->addFlash('error', 'Le lieu n\'existe pas.'); $this->actionLogger->log('ERROR_admin/placeType', ['osm_kind' => $osm_kind, 'osm_id' => $osm_id]); return $this->redirectToRoute('app_public_index'); @@ -370,7 +375,7 @@ final class AdminController extends AbstractController throw $this->createNotFoundException('Commerce non trouvé'); $this->actionLogger->log('ERROR_admin_show_commerce_form_id', ['id' => $id]); } - $this->actionLogger->log('ERROR_admin_show_commerce_form_id', [ + $this->actionLogger->log('admin_show_commerce_form_id', [ 'id' => $id, 'name' => $commerce->getName(), 'code_insee' => $commerce->getZipCode(),