Logs for #cakephp

Page 2 of 36,247, showing 100 records out of 3,624,625 total, starting on record 101, ending on 200

# At Username Text
# Yesterday, 13:39 jiri.sejhar if i have tree and update o item which is bettween others at first place and i update this item this item is now at last place in the branch in sql there is something strange . Why? UPDATE customers SET lft = ( (lft + -2) ) WHERE ( lft BETWEEN 3 AND 4 )
# Yesterday, 13:31 martin :P
# Yesterday, 13:23 ricksaccous international love
# Yesterday, 13:23 ricksaccous woah woah woah woah
# Yesterday, 13:22 martin hope we have no short plans to go international :P
# Yesterday, 13:22 martin oh I switched to irc again
# Yesterday, 13:21 Martin` :P
# Yesterday, 13:21 neon1024 It’s an ‘off-by-two’ error ;)
# Yesterday, 13:21 neon1024 Technically it already is, you’re just offset
# Yesterday, 13:20 martin everything switching to utc would be nice
# Yesterday, 13:20 martin something to look at,
# Yesterday, 13:20 martin when I use UTC in this project, things start two hours early :P
# Yesterday, 13:19 martin :P
# Yesterday, 13:19 admad ..and that's why kids you always use UTC
# Yesterday, 13:19 martin but I did expect it was not needed to set the timezone by formatting
# Yesterday, 13:19 martin I now do `'created' => $post['created_time']->i18nFormat('YYYY-MM-dd HH:mm:ss', 'Europe/Amsterdam')` that works fine :P
# Yesterday, 13:18 martin @admad yes that is what I have now, but from facebook (via webservice) I get an UTC time, and I just did save that one, but that fails
# Yesterday, 13:03 eax @spriz Negative, just a Command/Shell listening for stuff from Redis :slightly_smiling_face:
# Yesterday, 13:02 admad specify your timezone in db config and change PHP's default timezone to the same
# Yesterday, 13:01 martin I also want to change my databases to utc, but I think this will break other things :P
# Yesterday, 13:00 martin Wish I was default :(
# Yesterday, 12:56 admad you don't need to much around with those classes if all you need to to is change deefault timezone
# Yesterday, 12:54 spriz ofc if you never use FrozenTime and FrozenDate you don't need that :slightly_smiling_face:
# Yesterday, 12:53 spriz Nope, I realize that. But I guess "default" is UTC
# Yesterday, 12:53 admad they are not there by default, you need to add those statement if you don't need UTC
# Yesterday, 12:53 spriz try dis :slightly_smiling_face: https://gist.github.com/Spriz/d396e30451ab263b98c2e3b92dffaedd
# Yesterday, 12:52 martin https://github.com/cakephp/app/blob/master/config/bootstrap.php also not in the default bootstrap?
# Yesterday, 12:51 spriz Oh well, they could be elsewhere - but we've put them there for things to apply as early as possible
# Yesterday, 12:51 martin they are not there?
# Yesterday, 12:50 spriz `Date:: setDefaultLocale()` should be in `bootstrap.php`
# Yesterday, 12:50 spriz check the values of these 3: ``` \Cake\I18n\Time::getDefaultLocale(); \Cake\I18n\I18n::getLocale(); \Cake\I18n\I18n::getDefaultLocale(); ```
# Yesterday, 12:50 martin where is the Date:: setDefaultLocale ?
# Yesterday, 12:49 martin ```Cake\I18n\Time Object ( [time] => 2019-08-01T11:30:00+00:00 [timezone] => UTC [fixedNowTime] => ) 2019-08-01 11:30:00``` but still not working
# Yesterday, 12:49 martin last two things are in bootstrap
# Yesterday, 12:48 spriz and `ini_set('intl.default_locale', Configure::read('App.defaultLocale'));` also AFAIK
# Yesterday, 12:47 spriz also make sure `date_default_timezone_set(Configure::read('App.defaultTimezone'));` is in your `bootstrap.php`
# Yesterday, 12:47 spriz I don't remember which one
# Yesterday, 12:47 spriz or `nl-NL`
# Yesterday, 12:47 spriz they should also be `nl_NL`
# Yesterday, 12:47 spriz Also check for Date::, FrozenDate::, Time:: and FrozenTime:: `setDefaultLocale()` calls
# Yesterday, 12:46 martin APP_DEFAULT_TIMEZONE is not set
# Yesterday, 12:46 spriz try setting this in `app.php`: ``` 'defaultLocale' => 'nl_NL', 'defaultTimezone' => 'Europe/Amsterdam', ```
# Yesterday, 12:45 neon1024 Hah, yeah, good point @spriz
# Yesterday, 12:45 neon1024 Try outputting a format which includes the timezone
# Yesterday, 12:45 spriz is `APP_DEFAULT_TIMEZONE` env var set to `UTC`?
# Yesterday, 12:45 neon1024 ..and output the same
# Yesterday, 12:45 neon1024 Changing that setting should save to your DB at Amsterdam time
# Yesterday, 12:44 neon1024 It shouldn’t be
# Yesterday, 12:44 martin but when I format time it will be UTC when the object is UTC
# Yesterday, 12:43 martin ``` 'defaultLocale' => env('APP_DEFAULT_LOCALE', 'nl_NL'), 'defaultTimezone' => env('APP_DEFAULT_TIMEZONE', 'Europe/Amsterdam'),```
# Yesterday, 12:43 neon1024 https://github.com/cakephp/app/blob/master/config/app.default.php#L54
# Yesterday, 12:43 neon1024 I think you set it in app.php using the locale
# Yesterday, 12:42 martin default timezone of product is Europe/Amsterdam
# Yesterday, 12:42 martin now I need to do `->i18nFormat('YYYY-MM-dd HH:mm:ss', 'Europe/Amsterdam')`
# Yesterday, 12:42 martin is it possible to give i18nFormat a default timezone? or do I always need to set the timezone?
# Yesterday, 12:41 martin old database, not my choice :(
# Yesterday, 12:38 spriz Why would one not keep things in UTC until it hits the frontend? :(
# Yesterday, 12:34 martin also fixed in cake 4? :P
# Yesterday, 12:34 martin When I save an UTC time object to a Europe/Amsterdam database, it saves the utc time instead of adding 2 hours :(
# Yesterday, 12:25 ndm @khalid Yes, queries (instances of `\Cake\Database\Query` or `\Cake\ORM\Query`) are query builder objects. You can create the former via connection objects (`Connection::newQuery()`), and the latter via table objects `Table::query()`.
# Yesterday, 12:24 spriz @eax that sounds funky. Is it downright an event listener that listens to events fired in another PHP process?
# Yesterday, 12:22 khalid I am sorry I just kind of new to cake still..
# Yesterday, 12:22 khalid @ndm thanks, Query::insert() is Querybuilder right?
# Yesterday, 12:20 ndm @khalid `Table::saveMany()` is the slowest of them all (there are no `callbacks` and `validate` options btw, that's 2.x options), `Query::insert()` is faster, and then there's one additional way, that is to write plain SQL (make sure that you're using prepared statements if you chose that way!), which would be the fastest way on CakePHP level.
# Yesterday, 12:04 khalid I am already using savemany with array('callbacks' => false, 'validate' => false)
# Yesterday, 12:03 khalid there is no faster way
# Yesterday, 12:03 khalid @ndm thanks for your reply, so if I want to insert like 1million records, then I have no option except save or save many? or I go through QueryBuilder and write insert queries right?
# Yesterday, 11:12 ndm There is none, the 3.x connection manager stores the instantiated connection objects in a registry object that lives in a protected property for which there is no public accessor available.
# Yesterday, 11:05 val We have `ConnectionManager::sourceList()` in 2.x. What's its alternative in 3.x?
# Yesterday, 10:58 ndm No, it's not, there's not even a `DboSource` class in 3.x, that's 2.x stuff. In 3.x you can use the query builder to create insert statements without using the ORM.
# Yesterday, 10:49 khalid is insertMulti part of cake3.x?
# Yesterday, 10:46 khalid Thank you for the help.
# Yesterday, 10:46 khalid I am struggling with initialisation of DBO source.
# Yesterday, 10:45 khalid hi everyone, how to use DboSource insert multi in a model?
# Yesterday, 10:41 haresh Hello Guys I have used Cakephp 3.6 I have one security concern for below point, Please let us know your thought on this. The value of the URL path filename is copied into the response within the query string of a URL. The payload ?jukandgcs=1 was submitted in the URL path filename. This input was echoed as ?jukandgcs=1 within the "action" attribute of a "form" tag. So is it any security risk while submitting this form? You can see screenshot
# Yesterday, 10:41 slackebot Thanks
# Yesterday, 10:36 haresh Hello Guys I have used Cakephp 3.6 I have one security concern for below point, Please let us know your thought on this. The value of the URL path filename is copied into the response within the query string of a URL. The payload ?jukandgcs=1 was submitted in the URL path filename. This input was echoed as ?jukandgcs=1 within the "action" attribute of a "form" tag. So is it any security risk while submitting this form? You can see screenshot
# Yesterday, 10:36 slackebot Thanks
# Yesterday, 10:32 jiri.sejhar cake 3.7 version
# Yesterday, 10:28 dereuromark you should always mention the cake version
# Yesterday, 10:25 jiri.sejhar guys nobody answerd me is necesery do this array_merge($this->request->getData(), ['id'=>$item->id]) if i would get form data with id after insert save ?
# Yesterday, 09:41 eax Hey folks! Cake3 question: I am setting up some Integration Tests, and I need to test a system that has a Shell/Command running in the background as a listener. Is there a way to start that Listener, and then run the rest of my tests? Thanks!
# Yesterday, 09:37 dereuromark https://github.com/burzum/cakephp-service-layer
# Yesterday, 09:37 dereuromark service layer :slightly_smiling_face:
# Yesterday, 09:27 turkles I want to access some user data across controllers and some custom classes, possibly some Commands - where best to put it?
# Yesterday, 09:26 neon1024 Or does compact take a variable name, I forget
# Yesterday, 09:26 bernardine.ragas awww yeah, ill try
# Yesterday, 09:25 neon1024 So you’ll have `compact($subject)` somewhere in the code
# Yesterday, 09:25 neon1024 Undefined variable is self explanatory
# Yesterday, 09:25 neon1024 Well compact is a php method used in cake to set variables to the view
# Yesterday, 09:24 bernardine.ragas how do i fix this :slightly_smiling_face: please help
# Yesterday, 09:24 neon1024 Audit stash! I might need that one later too. Good reminder
# Yesterday, 09:24 bernardine.ragas Hi guys i have this problem, Undefined variable: subject [CORE/Cake/Utility/ObjectCollection.php, line 128
# Yesterday, 09:17 koeller I’m using muffin/footprint. I will have a further look into that. (y)
# Yesterday, 09:17 admad Also checkout Lorenzo/audit-stash plugin
# Yesterday, 09:16 admad There's muffin/footprint plugin for that
# Yesterday, 09:14 koeller @admad: The idea with a behavior sounds good. Thanks. But my problem right now is to get the authed user.
# Yesterday, 09:13 admad @koeller sounds good, though if you need to do so for multiple tables use a behavior
# Yesterday, 09:10 koeller Hi everyone, I’ve got a question regarding logging of deleted entities. I would like to log the user who did the delete operation and call the log (with LogAwareTrait) in Table::afterDeleteCommit(). What would be the best way to get the user here? Thank you!
# Yesterday, 09:10 val It looks like setting `defaultLocale` to `false` works