Log message #4052568

# At Username Text
# 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
# Jul 16th 2017, 20:58 nicolas.r thx
# Jul 16th 2017, 20:58 nicolas.r SELECT * FROM demandes WHERE created IN (SELECT max(created) FROM demandes group by original_demande)
# Jul 16th 2017, 20:58 savant if someone can help, they will
# Jul 16th 2017, 20:58 savant nicolas.r: just post the query
# Jul 16th 2017, 20:57 nicolas.r Hello everybody, hope you're fine :slightly_smiling_face: Anyone can help me to translate a sql query to cakephph query ? :slightly_smiling_face:
# Jul 16th 2017, 17:05 cleptric The environment also sets debug true/false
# Jul 16th 2017, 17:05 admad and yeah i actually use Asset.timestamp = 'force' not true :slightly_smiling_face:
# Jul 16th 2017, 17:05 cleptric @joris_ I’m hadnling it like this in my apps: `bootstrap.php` ``` Configure::write('AssetCompress.rawMode', false); if (ENVIRONMENT === Environment::DEVELOPMENT) { Configure::write('AssetCompress.rawMode', true); } ```
# Jul 16th 2017, 17:04 joris_ @admad that snippet is a good one!
# Jul 16th 2017, 17:03 joris_ i think its expected behavior, just didn't found anything of it in the docs.
# Jul 16th 2017, 16:57 admad also i use AssetCompress->css('styles', ['raw' => Configure::read('debug')])
# Jul 16th 2017, 16:56 admad i don't use assetcompress' timestamping feature but rather core one which appends timestamp as query string
# Jul 16th 2017, 16:55 joris_ so its working in production as expected, but i was testing it first and it was serving the new file through the standard URL
# Jul 16th 2017, 16:54 hmic if needed in production (with debug == false) set it to 'force' instead
# Jul 16th 2017, 16:54 joris_ @admad i've done that but when debug=true it serves style.min.css and when debug=false it serves style.min.vX.css
# Jul 16th 2017, 16:52 admad set Asset.timestamp to true
# Jul 16th 2017, 16:52 admad @joris_ asset timestamping is a core feature