diff --git a/src/Controller/StaticContentController.php b/src/Controller/StaticContentController.php index 44c77595..95b9c8bd 100644 --- a/src/Controller/StaticContentController.php +++ b/src/Controller/StaticContentController.php @@ -212,8 +212,7 @@ class StaticContentController extends Controller throw $this->createNotFoundException('The item does not exist'); // set and save values - $row->setID($req->request->get('id')) - ->setContent($req->request->get('content')); + $row->setContent($req->request->get('content')); // validate $errors = $validator->validate($row); @@ -221,13 +220,6 @@ class StaticContentController extends Controller // initialize error list $error_array = []; - // check for duplicate ID - $result = $em->getRepository(StaticContent::class)->find($id); - if ($result != null) - { - $error_array['id'] = 'Duplicate ID exists.'; - } - // add errors to list foreach ($errors as $error) { $error_array[$error->getPropertyPath()] = $error->getMessage(); diff --git a/templates/static-content/form.html.twig b/templates/static-content/form.html.twig index 3f078773..0a1f4f0d 100644 --- a/templates/static-content/form.html.twig +++ b/templates/static-content/form.html.twig @@ -39,7 +39,7 @@ - +