diff --git a/app/src/Application.php b/app/src/Application.php index 4ef407d80..fb3c32775 100644 --- a/app/src/Application.php +++ b/app/src/Application.php @@ -90,7 +90,7 @@ public function bootstrap(): void $this->addPlugin($p->plugin); } } - catch(\Cake\Database\Exception\DatabaseException $e) { + catch(\Cake\Database\Exception\QueryException | \Cake\Database\Exception\DatabaseException $e) { // Most likely we are performing the initial database setup and // the plugins table is missing. } diff --git a/app/src/Model/Behavior/NormalizationBehavior.php b/app/src/Model/Behavior/NormalizationBehavior.php index f0305c079..c4be92eeb 100644 --- a/app/src/Model/Behavior/NormalizationBehavior.php +++ b/app/src/Model/Behavior/NormalizationBehavior.php @@ -66,7 +66,7 @@ public function beforeMarshal(Event $event, ArrayObject $data, ArrayObject $opti // but for that we need $data in entity form. // This will recurse, so make sure to break the loop - $entity = $Table->newEntity((array)$data, options: ['skipNormalization' => true]); + $entity = $Table->newEntity((array)$data, options: ['skipNormalization' => true, 'validate' => false]); $coId = $Table->calculateCoForRecord($entity);