I have some code which has broken somewhere along the way and I'm having trouble debugging it.
This is a simplified version of it.
$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)) {
// sunshine and rainbows
} else {
// wailing and gnashing of teeth
}
I'm left wailing and gnashing teeth without any errors, as far as I can see if I debug the $data it looks like it's ok (though since it's fairly long and contains a bunch of UUIDs it's possible I'm missing something).
Validation errors is empty.
The save is returning false - any suggestions on how to debug this might save what sanity I have left.
Thanks!
Table::save()call.