Log message #4052585

# At Username Text
# Jul 17th 2017, 05:24 jeremyharris https://cakesf.slack.com/archives/C053DPNGT/p1500267592756371
# Jul 17th 2017, 05:23 admad The plural of person is people not persons
# Jul 17th 2017, 05:23 jeremyharris Ok great. Now the users table please. And debug($person) right after patchEntity
# Jul 17th 2017, 05:18 iqbalchannar796 sure sir
# Jul 17th 2017, 05:15 jeremyharris Please paste your PersonsTable into http://gist.github.com
# Jul 17th 2017, 05:13 slackebot } debug($user->errors()); $this->Flash->error(__('The user could not be saved. Please, try again.')); }
# Jul 17th 2017, 05:13 iqbalchannar796 $user = $this->Users->newEntity(); if ($this->request->is('post')) { // pr($this->request->data); // die; $user = $this->Users->patchEntity($user, $this->request->data, ['associated' => ['Persons']]); if ($this->Users->save($user, ['associated' => ['Persons']])) { $this->Flash->success(__('The user has been saved.')); return $this->redirect(['action'
# Jul 17th 2017, 05:12 iqbalchannar796 ERROR "Cannot marshal data for "Users" association. It is not associated with "Persons". "
# Jul 17th 2017, 05:10 jeremyharris And the other things too please
# Jul 17th 2017, 05:10 jeremyharris debug($person)
# Jul 17th 2017, 05:09 jeremyharris gist.github.com
# Jul 17th 2017, 05:09 iqbalchannar796 how Jeremyharris ??
# Jul 17th 2017, 05:03 jeremyharris Can you gist the Persons table and the request data and the $person entity after patching
# Jul 17th 2017, 05:02 iqbalchannar796 i want to use add function of UsersController for storing association data
# Jul 17th 2017, 05:01 iqbalchannar796 yes
# Jul 17th 2017, 04:59 jeremyharris Also, since you're not following conventions there might be more setup (the plural of person is people)
# Jul 17th 2017, 04:59 jeremyharris https://book.cakephp.org/3.0/en/orm/associations.html
# Jul 17th 2017, 04:57 jeremyharris Did you add the association on the table's initialize method?
# Jul 17th 2017, 04:39 iqbalchannar796 ???
# Jul 17th 2017, 04:39 iqbalchannar796 can anyone help me
# Jul 17th 2017, 04:39 iqbalchannar796 3.3.15
# Jul 17th 2017, 04:38 iqbalchannar796 i am using cakephp 3.3
# Jul 17th 2017, 04:36 slackebot ($this->Persons->save($person, ['associated' => ['Users']])) { // $user = $this->Users->patchEntity($user, $this->request->data); // if ($this->Users->save($user)) { $this->Flash->success(__('The user has been saved.')); return $this->redirect(['action' => 'index']); } debug($person->errors()); $this->Flash->error(__('The user could not be saved. Please, try ag
# Jul 17th 2017, 04:36 slackebot } $this->set(compact('person')); $this->set('_serialize', ['person']); }
# Jul 17th 2017, 04:36 slackebot not work ERROR "Cannot marshal data for "Users" association. It is not associated with "Persons". " public function add() { $this->loadModel('Persons'); $person = $this->Persons->newEntity(); if ($this->request->is('post')) { // pr($this->request->data); // die; $person = $this->Persons->patchEntity($person, $this->request->data, ['associated' => ['Users']]); if
# Jul 17th 2017, 04:36 iqbalchannar796 i have two tables 1-Persons 2-Users Structure of PERSONS table id first_name second_name email address created modified ................ Structure of USERS table id person_id username password role_id created modified ...................... My Question is that how can i store data from UsersController with Association ?????? My Add function in UsersController is that i have modified according to require
# Jul 17th 2017, 04:35 iqbalchannar796 hi
# Jul 17th 2017, 03:03 braeden session_start(); $_SESSION[ 'blah' ] = true; etc.
# Jul 17th 2017, 03:03 braeden are sessions working outside of CakePHP?
# Jul 17th 2017, 03:03 braeden Hmm not sure what the problem is, kinda hard to diagnose
# Jul 17th 2017, 02:17 banna @braeden http://dev.casaparticulares.net/ hit the url and you will see
# Jul 17th 2017, 01:55 braeden phpinfo(); ?
# Jul 17th 2017, 01:54 banna also flash messages are not getting cleaned up, it shows on everytime i refresh the page
# Jul 17th 2017, 01:46 banna I used cookie to remember login, and now it doesn't logs me out
# Jul 17th 2017, 01:45 banna Hello Guys, cakephp 2, session and cookies not getting deleted properly, using same code on main domain and subdomain
# Jul 17th 2017, 01:45 braeden That's confusing
# Jul 17th 2017, 01:40 dblowfish I have an Article that hasMany Comments. When I edit the Article, I remove one of the Comments. When I save,what is the best way to have Cake delete the comment that is not in the request? ( the one the user deleted on the client )
# Jul 16th 2017, 23:30 braeden Why not just execute the SQL directly?
# Jul 16th 2017, 20:59 savant https://book.cakephp.org/3.0/en/orm/query-builder.html#subqueries
# Jul 16th 2017, 20:58 nicolas.r okeyt :slightly_smiling_face:
# Jul 16th 2017, 20:58 savant if someone cant, they wont