Logs for #cakephp

Page 5 of 36,130, showing 100 records out of 3,612,917 total, starting on record 401, ending on 500

# At Username Text
# May 20th, 09:31 kgb.acct.personal > Ah. So it's what enables `contain` in model. I mean, in Cake 2
# May 20th, 09:31 neon1024 https://book.cakephp.org/3.0/en/orm/query-builder.html#loading-associations
# May 20th, 09:30 kgb.acct.personal I think I have to re-read the doc
# May 20th, 09:30 kgb.acct.personal Wut
# May 20th, 09:29 neon1024 No need to ‘enable’ it
# May 20th, 09:26 kgb.acct.personal Thanks neon
# May 20th, 09:26 kgb.acct.personal Ah. So it's what enables `contain` in model.
# May 20th, 09:20 neon1024 `$ExamplesTable->find()->contain(['Tutorials'])`
# May 20th, 09:20 neon1024 If you’re using Cake 3, then `contain()` is an ORM method in the Query class
# May 20th, 09:19 kgb.acct.personal It's built-in on Cake 3, but not on Cake 2? So I may have to define it?
# May 20th, 09:18 neon1024 It’s so helpful, it was included in the core for Cake 3
# May 20th, 09:17 neon1024 @kgb.acct.personal For Cake 2? Yes, it’s very helpful
# May 20th, 09:15 kgb.acct.personal ELI5: What is ContainableBehavior? Is it really necessary?
# May 20th, 07:31 dereuromark of course, in the Backend if you run a 3.x version. otherwise just run it with -v and log the output into a file. > log.txt
# May 20th, 06:36 nils @dereuromark regarding the Queue-plugin, is it possible to check if the worker is running? I added the crontab settings as in the documentations, but the jobs haven't been triggered.
# May 20th, 04:40 admad @maymeow using a middleware or Controller:: afterFilter () callback
# May 19th, 20:55 waan can't open webset in xammp
# May 19th, 20:40 maymeow how can i modify header on each response? (i need add header of each response)
# May 19th, 11:51 ndm I did things manually for quite some time, but with larger navigations, things started to become really annoying, so I took the time to create a plugin for it: https://github.com/icings/menu
# May 19th, 02:21 gonnbe1106 Thanks @waspinator I will try everything. I am gonna report the result here later.
# May 19th, 02:19 waspinator if that works, then there is an issue with your cakephp configuration, or php connector. otherwise its something to do with mysql
# May 19th, 02:18 waspinator try connecting to your mysql using https://www.sequelpro.com/
# May 19th, 02:12 gonnbe1106 I did. I can log in mySQL as root from terminal, and wrote on Datasources, but nothing has chanaged.
# May 19th, 02:08 waspinator okay, so try root as the user
# May 19th, 02:08 slackebot <gonnbe1106>
# May 19th, 02:07 waspinator after clicking on `cake_youtube_db` there should be a `Privileges` tab. make sure your user is listed there
# May 19th, 02:06 gonnbe1106 User name is root and i did not touch password of this, so it might be root. I try to change this password as root. However I think it will be the same..
# May 19th, 02:04 slackebot <gonnbe1106>
# May 19th, 01:59 waspinator can you log into myphpadmin using those credentials? and do you see `cake_youtube_db` listed in the tree?
# May 19th, 01:58 waspinator have you created your database?
# May 19th, 01:58 waspinator hmm, it looks like MAMP might actually use 8889
# May 19th, 01:55 gonnbe1106 yes...
# May 19th, 01:54 waspinator same error?
# May 19th, 01:53 gonnbe1106 I did, but it did not work.....
# May 19th, 01:51 waspinator 3306 is the default mysql port
# May 19th, 01:51 waspinator that's just the UI and separate from your mysql server
# May 19th, 01:50 gonnbe1106 Thanks. I will. By the way MYPHPAdmin's Server is localhost:8889.
# May 19th, 01:46 waspinator try port 3306
# May 19th, 01:35 slackebot <gonnbe1106>
# May 19th, 01:32 gonnbe1106 sorry, I am very new to CakePHP. I tried to connect with MySQL but got this error message. ``` ```
# May 19th, 00:55 waspinator can you retrieve results in an entity? I need to set a virtual field based on data from another table
# May 18th, 19:54 niel45 but if anyone has advise on preventing form label from being inflected, I would really appreciate that :-)
# May 18th, 19:54 niel45 n/m I figured it out.
# May 18th, 19:44 niel45 Using the FormHelper, is there a way to specify that a select option is the 'selected' entry?
# May 18th, 15:45 neon1024 Why is it `$controller->getRequest()` but `$controller->viewBuilder()`
# May 18th, 15:41 neon1024 I quite like the idea of working it out in the View Cell using a private method, but I’m not too sure what you’d set to the template which wouldn’t need lots of conditional checks, or for you to build the whole nav, say as an array, and use `Hash::get` or similar
# May 18th, 15:38 neon1024 If you have prefixes and active state per controller + action combo, the conditions can get a bit big and fill up the templating with lots of conditional logic which shouldn’t really be in a template
# May 18th, 15:37 neon1024 How do people tackle active state in navigation? Do you check in the templating? Check in the View Cell and pass a var to the front-end? Do you use a helper? Or are you using a super clever navigation package?
# May 18th, 12:34 waspinator https://book.cakephp.org/3.0/en/installation.html#permissions
# May 18th, 10:15 snake-venom what is the right secure permission for tmp and logs folder ?
# May 18th, 08:36 asdf_ hi
# May 17th, 20:12 challgren I’m using MariaDB and Queue dev-master so its not just limited to the 2.x branch
# May 17th, 18:07 a.francazi yet i still get the same problem
# May 17th, 17:49 grzes guys pls code-review my latest little package: https://github.com/kminek/url-id :)
# May 17th, 17:47 admad You wouldn't have to use two method calls like this if were using my Glide plugin :slightly_smiling_face:
# May 17th, 17:43 this.impetus @admad I must have been drooling on that part of the screen. : / ty
# May 17th, 17:42 a.francazi @admad ah ok, i'll see to it. thanks
# May 17th, 17:42 admad @this.impetus the escape options go in the 3rd argument, not in the URL array in 2nd argument
# May 17th, 17:42 this.impetus It's producing a link with the image URL as the link text
# May 17th, 17:41 this.impetus Afternoon guys. How do you get the HTML helper to allow an image that's also a link? https://api.cakephp.org/3.7/class-Cake.View.Helper.HtmlHelper.html#_link seems to suggest using `escape` and/or `escapeTitle` keys in the link options, but it's not working for me, here's the code: ```$this->Html->link( $this->Thumb->fit($img->path, ['height' => $img->h, 'width' => $img->w]), ['escapeTitle'=> false, 'escape'=> false, 'controller'
# May 17th, 17:41 slackebot => 'Controller', 'action' => 'view', $id ]);```
# May 17th, 17:41 admad best way to avoid such problems is set the same timezone for PHP and the MySQL
# May 17th, 17:41 admad ah i see, in the second case a CakePHP Time object is being created from the datetime string with a differnt timezone
# May 17th, 17:39 admad it would be possible if in one case the time calculation is done in PHP but not for what you describe
# May 17th, 17:38 admad @a.francazi how does it give you different when both run on same mysql instance?
# May 17th, 17:38 niel45 oh,m and is it the same MySQL server also
# May 17th, 17:36 niel45 i.e. both going through cake?
# May 17th, 17:36 niel45 @a.francazai, is that using the same connection method?
# May 17th, 17:28 a.francazi I'm UTC +02:00 btw
# May 17th, 17:27 a.francazi i have a problem with timezone. if i do `SELECT now() - INTERVAL 1 DAY` on my mysql server it correctly gives me `2019-05-16 19:22:05`. But if I do `$query->newExpr('now() - INTERVAL 1 DAY')` in cakephp it somehow gets `2019-05-16 17:22:05` which is 2 hours off. why's that and where can i change it so it behaves correctly?
# May 17th, 16:05 neothermic @jeremyharris It doesn't need to do a full table scan if you can give it an index to filter down from at first
# May 17th, 16:04 dereuromark omg.. @admad I am surprised how easy it was to apply something similar to read() here. But one key difference: It is cleaner if the path is an array here right away: https://github.com/dereuromark/cakephp-dto/pull/22
# May 17th, 16:02 neothermic ok, so I've concluded that for anything other than simple singular value extracts, Set::extract and Hash::extract are not 100% compatible with each other
# May 17th, 15:23 admad i wonder what use case requires exact name matches like the query showed above yields
# May 17th, 15:23 jeremyharris I suppose the query explainer would give me the hard truth
# May 17th, 15:21 jeremyharris fair enough :P
# May 17th, 15:21 admad only if the concatenation is more efficient than one LIKE
# May 17th, 15:20 jeremyharris side question: from a performance standpoint, would one LIKE be more efficient than 2? I wouldn’t think so since it has to do a full table scan anyway
# May 17th, 15:20 martin ```$user = $this->Users->find()->where(function ($exp, $query) use ($line) { $conc = $query->func()->concat([ 'firstname' => 'identifier', ' ', 'lastname' => 'identifier' ]); return $exp->eq($conc, $line); })->first();```
# May 17th, 15:19 jeremyharris I guess if you’re he’s looking for an exact match, I just assumed fuzzy
# May 17th, 15:18 admad why bother concating? `WHERE first_name like ‘%jeremy%’ OR last_name like ‘%jeremy%’` would yield the same matches
# May 17th, 15:16 jeremyharris so something like WHERE CONCAT(first_name. ' ‘, last_name) like ‘%jeremy%’
# May 17th, 15:16 martin found it
# May 17th, 15:16 martin oh, yes just started thinking about googleing on concat instead combine :P
# May 17th, 15:15 jeremyharris concat
# May 17th, 15:15 martin I’ve users with a firstname and lastname field in database. now I need to search on full name? what is best way to do this? need to combine 2 fields (with space between). I know how to do this in mysql but how do I do it the right way in cake query?
# May 17th, 15:09 admad i don't but that does look useful
# May 17th, 15:04 dereuromark Is someone using DTOs yet as well? Does read() make sense similar to cake core? https://github.com/dereuromark/cakephp-dto/issues/21
# May 17th, 14:33 voycey had the benefit of slimming down our code somewhat
# May 17th, 14:33 voycey we re-wrote to be honest - it was a killer trying to migrate
# May 17th, 14:06 neothermic we did cake 1 to cake 2 a few years back, and now the cake2 is even larger than before...
# May 17th, 14:06 nils Haha, I don't envy you!
# May 17th, 14:06 neothermic Welcome to my hell, except this codebase started late 2010 on cake1 :)
# May 17th, 14:05 nils I guess. I'm the only developer in it. The project started 2013 so I get quite frustrated with the 2013-version of me. :slightly_smiling_face:
# May 17th, 14:02 neothermic how large the codebase is, how many developers you have, how many cake2-isims you've got, how recent your cake2 install is, how much you rely on removed functionality, etc
# May 17th, 14:01 neothermic I suspect the time it takes varies on multiple factors
# May 17th, 14:01 neothermic I'm slowly doing that now
# May 17th, 14:01 nils Did anyone migrate from 2.x to 3.x? How time consuming should I expect it to be?
# May 17th, 14:00 neothermic but yeah, any thoughts on why this isn't behaving the same?
# May 17th, 13:57 neothermic :)