Log message #4209268

# At Username Text
# Oct 17th 2019, 14:28 ricksaccous lmao
# Oct 17th 2019, 14:27 neon1024 Guess we’re sticking with MySQL 5.7 then :,)
# Oct 17th 2019, 14:26 graziel iirc they said they will disable that switch as some point so it will come back
# Oct 17th 2019, 14:25 neon1024 I must admit, I tend to turn it off myself
# Oct 17th 2019, 14:24 neon1024 I think it’s because this is incompatible with sql_mode=only_full_group_by
# Oct 17th 2019, 14:14 slackebot1 tables like `marketinginfos`
# Oct 17th 2019, 14:14 mrfeedback any idea why `$query->distinct(['Projects.id']);` `$query->group('Projects.id');` does not work? I get `PDOException: SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #33 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'vvv_test.Marketinginfos.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by` as I am also joining other
# Oct 17th 2019, 14:12 ricksaccous i did something similar in a subquery join
# Oct 17th 2019, 14:11 ckjksl but would that take a while?
# Oct 17th 2019, 14:11 ckjksl I could get unique ids from all the items first and then foreach id, search for their latest entry
# Oct 17th 2019, 14:11 ckjksl Yes, that would work if i was looking for a particular item. But I'm trying to get all the latest entry of all the items (from a certain date)
# Oct 17th 2019, 14:10 ricksaccous order->(['destinations.validfrom' => 'desc']);
# Oct 17th 2019, 14:10 ricksaccous ->limit(1);
# Oct 17th 2019, 14:09 ckjksl I need the last entry from today, not all the entries from today
# Oct 17th 2019, 14:09 ricksaccous what's the problem here
# Oct 17th 2019, 14:09 ricksaccous so wouldn't that make sense
# Oct 17th 2019, 14:09 ricksaccous you are getting anything less than today it seems
# Oct 17th 2019, 14:08 ckjksl this is cool and all, but I think this experession actually gets me both the Feb 2019 entry and the May 2019 entry
# Oct 17th 2019, 14:08 ckjksl right now I have: `->andWhere(function($exp) use($validdate) { $exp->lte('destinations.validfrom', $validdate);return $exp;})`
# Oct 17th 2019, 14:07 ckjksl I have multiple entries for the same item, but each of the entries have a valid date. Example: if i search with a date of Feb 2019, I will only find things valid from Feb 2019. If there is a change in May 2019 and I search today, I should get the latest version, which is the May 2019.
# Oct 17th 2019, 14:06 ricksaccous use date time objects in the ORM
# Oct 17th 2019, 14:05 ckjksl I've got a question about ORM and searching with dates
# Oct 17th 2019, 14:04 mehov Okay, `$this->request->getSession()->read('Auth.User')` - but won't `request` get deprecated and replaced with `getRequest()` in 4.x?
# Oct 17th 2019, 14:00 alexdd55976 it does... working with at this moment
# Oct 17th 2019, 14:00 slackebot1 `Undefined variable: APP_user`, and this feels workaround-ish too What is the common accepted practice for this that'll work with 4.x? I don't need the complete answer, just link to the docs would be great
# Oct 17th 2019, 14:00 mehov Hi all, I need to know if user is logged in inside a Layout file. I found https://stackoverflow.com/questions/5901685/cakephp-check-if-user-is-logged-in-inside-a-view/, but it's either outdated, or doesn't work, or feels workaround-ish I put this in my AppController ``` public function beforeFilter(\Cake\Event\Event $event) { $this->set([ 'APP_user' => $this->Auth->user(), ]); } ``` and it gives me
# Oct 17th 2019, 13:45 neon1024 I wonder if codeception supports fixtures :thinking_face: Although that’s a lot of data to ingest per test-case, unless it was a suite level import
# Oct 17th 2019, 13:41 neon1024 When creating an acceptance test suite, using something like codeception, do you populate forms with data and submit them as part of a test? Wouldn’t test data build up in the dev db this way?
# Oct 17th 2019, 13:41 admad @francis.nadal use `dd(func_get_args())` in your closure and you will get idea of all arguments passed to it :slightly_smiling_face:
# Oct 17th 2019, 12:37 francis.nadal um hi @jotpe hope you're not very busy as of the moment hehe. just a question, I'm trying to rename my photos and I'm using nameCallback of the cake-upload plugin. But I'm seem to be confused about what to put in the arguments
# Oct 17th 2019, 12:01 jotpe You're welcome
# Oct 17th 2019, 12:01 francis.nadal @jotpe thank you again! I will try and see if any problem comes up hehe
# Oct 17th 2019, 12:00 jotpe @francis.nadal that should work :slightly_smiling_face:
# Oct 17th 2019, 12:00 jotpe @vjnvisakh I use CakePdf (https://github.com/FriendsOfCake/CakePdf/tree/1.0) in a old project. You need to create a .ctp as template and pass some viewVars
# Oct 17th 2019, 11:58 francis.nadal @jotpe my other question is, they have different validation should I put them differently like this?
# Oct 17th 2019, 11:57 francis.nadal @jotpeindeed! thank you very much for your help. I will be using the plugin
# Oct 17th 2019, 11:54 jotpe When you remove (or comment out) the validator the file is not validated, so better add some rules :slightly_smiling_face:
# Oct 17th 2019, 11:53 jotpe it's path
# Oct 17th 2019, 11:53 jotpe @francis.nadal there you go: https://cakephp-upload.readthedocs.io/en/latest/configuration.html#behavior-configuration-options
# Oct 17th 2019, 11:46 slackebot1 <francis.nadal>
# Oct 17th 2019, 11:46 francis.nadal @jotpe file was moved too but only the filename was saved in the db. so I might need to check cake-upload plugin documentation how to add the path so that I can render the image in frontend as well