Good time of day, there was a strange problem. In order: there is an admin panel, there is a user part, both have approximately the same save code, after changing data from the form, but in the admin part, after saving absolutely nothing comes, the white page and the code stops, no validation errors, no debugging, anywhere . The next part of the code, after model-> save, is not executed at all. The problem appeared after moving to version 3.6 Code:
public function edit($alias = null) { if (!$alias) { throw new NotFoundException(__('Неверная ссылка')); } $link = $this->Links->findByAlias($alias)->first(); if (!$link) { throw new NotFoundException(__('Неверная ссылка')); } $bundles = $this->Links->Bundles ->find('list', [ 'keyField' => 'id', 'valueField' => 'title' ]) ->where(['user_id' => $link->user_id]); $this->set('bundles', $bundles); if ($this->request->is(['post', 'put'])) { $link = $this->Links->patchEntity($link, $this->request->getData()); if ($this->Links->save($link)) { $this->Flash->success(__('The Link has been updated.')); return $this->redirect(['action' => 'edit', $alias]); } else { //debug( $link->errors() ); $this->Flash->error(__('Oops! There are mistakes in the form. Please make the correction.')); } } $this->set('link', $link); } Here is what is written in error.log
Warning: The connection is going to be closed but there is an active transaction. This problem occurs with most models in the admin panel.
save, and does not write anything to the log, with debug enabled in the config? Admin and the rest work through one connection? - terangetDatain the admin and where it works. Plus, in the admin area, it is possible that some events are hung on save / delete, etc. MB there that falls? - teran