I have a code that broke somewhere along the way, and I had trouble debugging it.
This is a simplified version.
$data = $this->request->data; $form = $this->Forms->get($data['id'], [ 'contain' => ['FieldsForms' => ['data'] ] ]); $form = $this->Forms->patchEntity($form, $data, ['associated' => [ 'FieldsForms.Data', ] ]); if ($this->Forms->save($form)) {
I leave the weeping and gnashing of teeth without any errors, as far as I can see if I am debugging the $ data, how it looks normal (although since it is quite long and contains a bunch of UUIDs, maybe I am missing something).
Verification errors are empty.
Saving returns false - any suggestions on how to debug this can save what I have left.
Thanks!
source share