Log message #4160245

# At Username Text
# Jul 18th 2018, 15:14 dereuromark sry, did only test with the apps that seem to have those built in
# Jul 18th 2018, 15:13 dereuromark yeah I guess those are pulled in the main layout assets.
# Jul 18th 2018, 15:13 flavius well you didn't include any of that in your plugin
# Jul 18th 2018, 15:12 dereuromark seems also to miss some styling for the overlay window that runs the ajax for executing the test and displaying result
# Jul 18th 2018, 15:11 flavius File uploaded https://cakesf.slack.com/files/U75U0UMR9/FBSKC7W75/image.png / https://slack-files.com/T053DPNCM-FBSKC7W75-af970fb2e0 - <@U052SF4V6> not really sure how this is supposed to work
# Jul 18th 2018, 14:58 josbeir so best do do it below after the save stuff
# Jul 18th 2018, 14:58 josbeir yep but rules not
# Jul 18th 2018, 14:57 neon1024 Entity errors will be present after patchEntity ;)
# Jul 18th 2018, 14:56 josbeir also check the Email entity's $accessible array if all fields you want to save are defined there (if the property is present)
# Jul 18th 2018, 14:55 josbeir see whats inside that array
# Jul 18th 2018, 14:55 josbeir and save
# Jul 18th 2018, 14:55 josbeir do a $email->getErrors();
# Jul 18th 2018, 14:55 mr.mjsm $email = $this->Emails->patchEntity($email, ['email' => $this->request->getData('email'), 'is_primary' => 'true', 'company_id' => $company->company_id ]);
# Jul 18th 2018, 14:55 mr.mjsm i am thinking my assignment here is wrong
# Jul 18th 2018, 14:55 josbeir above the $this->set below
# Jul 18th 2018, 14:54 josbeir validation and/or rules are probably failing
# Jul 18th 2018, 14:54 mr.mjsm $this->Emails->save($email) results in FALSE
# Jul 18th 2018, 14:54 mr.mjsm the saving part
# Jul 18th 2018, 14:54 josbeir then what does not work ?
# Jul 18th 2018, 14:54 mr.mjsm it does exit, this $query = $this->Emails->find('all', ['conditions' => ['Emails.email' => $this->request->getData('email')]]); works just fine
# Jul 18th 2018, 14:53 josbeir and make sure EmailsTable exists
# Jul 18th 2018, 14:53 mr.mjsm nope.
# Jul 18th 2018, 14:52 josbeir did you do $this->loadModel('Emails') in your controller initialize()
# Jul 18th 2018, 14:51 flavius +1 for that jquery dependency, just noticed it now
# Jul 18th 2018, 14:51 mr.mjsm did it, still same problem ;(
# Jul 18th 2018, 14:51 josbeir also, maybe read up on cakephp basics, and php's compact function first :)
# Jul 18th 2018, 14:50 josbeir $this->set(compact('company', 'email'));
# Jul 18th 2018, 14:50 josbeir add 'email' to the compact() function too
# Jul 18th 2018, 14:50 mr.mjsm File uploaded https://cakesf.slack.com/files/UBN7KUDRA/FBTPT5V39/-.php / https://slack-files.com/T053DPNCM-FBTPT5V39-8a4ae830ee
# Jul 18th 2018, 14:50 unclezoot could anyone through me a hint on how to create an 'alias' so addShortPluginAliases() doesn't throw an error when i have the same function name in 2 different shells?
# Jul 18th 2018, 14:50 mr.mjsm @josbeir so i just got home and removed the last else statement. it worked with no errors. However when I try to add into the email model, it results in false. i don't know if my assignments are wrong. look at the code below. at the beginning you will see the Email entity model and I commented the if statement that results in FALSE
# Jul 18th 2018, 14:50 dereuromark feel free to suggest improvements, I wanted to keep asset overhead minimal for now, focusing on the funciotnal background tasks
# Jul 18th 2018, 14:49 josbeir i haven't started on the front-end over here so my base cake app is still pristine
# Jul 18th 2018, 14:49 flavius need to do a new project in order to test your plugin :P
# Jul 18th 2018, 14:49 flavius i dont have the default layout anymore
# Jul 18th 2018, 14:48 josbeir tables are so 2.0
# Jul 18th 2018, 14:48 josbeir that would be better, also update naming "tables => models"
# Jul 18th 2018, 14:48 flavius with its own css and js dependencies
# Jul 18th 2018, 14:48 flavius why dont you give it its own layout?
# Jul 18th 2018, 14:48 josbeir it looks like it also needs a jquery dependency
# Jul 18th 2018, 14:46 dereuromark File uploaded https://cakesf.slack.com/files/U052SF4V6/FBU2MRH5L/screenshot_from_2018-07-18_16-45-57.png / https://slack-files.com/T053DPNCM-FBU2MRH5L-82284592dd