Logs for #cakephp

Page 8 of 36,061, showing 100 records out of 3,606,097 total, starting on record 701, ending on 800

# At Username Text
# Mar 13th, 22:32 challgren Weird Im following that and when I try to login I get The request object does not contain the required ‘authentication’ attribute
# Mar 13th, 22:25 rochasmarcelo @challgren https://github.com/CakeDC/users-example this is 'work in progress' but could help.
# Mar 13th, 20:47 challgren @steinkel or @CakeDC team do you have any example apps with CakeDC/Users dev-develop loaded? Running into some issues and would be helpful to look at an example. The develop docs are all over the place
# Mar 13th, 19:35 ricksaccous not sure if you already looked at that
# Mar 13th, 19:35 ricksaccous @tunafish https://book.cakephp.org/3.0/en/orm/query-builder.html#subqueries
# Mar 13th, 18:38 ruc0la is the configuration correct and the problem is somewhere else?
# Mar 13th, 18:38 ruc0la this cakephp2 was installed with composer and I get server error (500)
# Mar 13th, 18:38 slackebot <ruc0la>
# Mar 13th, 18:37 ruc0la Hey all, Can somebody assist me with some nginx configuration for cakephp2?
# Mar 13th, 18:08 slackebot +----+-----------+---------------+---------+---------------------+ | 1 | 7 | haproxy | 1.7.11 | 2018-06-05 17:23:10 | | 2 | 7 | filebeat | 5.6.9 | 2018-06-05 17:23:10 | | 3 | 7 | keepalived | 1.2.13 | 2018-06-05 17:23:10 | | 4 | 7 | exim | 4.84_2 | 2018-06-05 17:23:10 | | 5 | 7 | haproxy | 1.7.11 | 2018-06-12 09:22:01 | | 6 | 7 | filebeat | 5.6.9 |
# Mar 13th, 18:08 slackebot 2018-06-12 09:22:01 | | 7 | 7 | keepalived | 1.2.13 | 2018-06-12 09:22:01 | | 8 | 7 | exim | 4.84_2 | 2018-06-12 09:22:01 | | 9 | 7 | haproxy | 1.7.11 | 2018-06-18 13:00:46 | | 10 | 7 | filebeat | 5.6.10 | 2018-06-18 13:00:46 | | 11 | 7 | exim | 4.84_2 | 2018-06-18 13:00:46 | +----+-----------+---------------+---------+---------------------+ ``` What I want, is to have on
# Mar 13th, 18:08 slackebot +-----------+---------------+---------+---------------------+ | server_id | software_name | version | state_date | +-----------+---------------+---------+---------------------+ | 7 | keepalived | 1.2.13 | 2018-06-12 09:22:01 | | 7 | haproxy | 1.7.11 | 2018-06-18 13:00:46 | | 7 | filebeat | 5.6.10 | 2018-06-18 13:00:46 | | 7 | exim | 4.84_2 | 2018-06-18 13:00:46 |
# Mar 13th, 18:08 slackebot query which fetches the current version for every `software_name` in the table. The SQL which does this, looks like this: ``` select server_id, software_name, version, state_date from server_software_versions WHERE state_date = (select MAX(myAlias.state_date) FROM server_software_versions myAlias WHERE server_software_versions.software_name = myAlias.software_name) order by state_date; ``` The results of this query: ```
# Mar 13th, 18:08 slackebot +-----------+---------------+---------+---------------------+ ``` The part which I can't figure out and can't find in the docs, is how to alias the table in the subquery. Any help would be greatly appreciated.
# Mar 13th, 18:08 tunafish Hi everyone! I'm having some trouble writing a query in the ORM. It uses a where with a subquery referencing the main query to select the row with a maximum value in it, and aliases the table in the subquery. I'll clarify: My table looks like this: ``` +----+-----------+---------------+---------+---------------------+ | id | server_id | software_name | version | state_date |
# Mar 13th, 16:41 this.impetus ah ha. ok. tyvm. I'm on my way now
# Mar 13th, 16:32 this.impetus So in the example page you linked, the key 'photo'—is that a sample field name? Or should the photos array contain a "fields" key?
# Mar 13th, 16:27 this.impetus sadly I'm someone who doesn't reallllly understand cake but once I learn to accomplish a thing I can repeat it lol. assembling enough pieces eventually passes for competence
# Mar 13th, 16:26 this.impetus yeah I guessed as much. seems like a pretty cakey logic
# Mar 13th, 16:26 ricksaccous okay, to give you a further hint it has to do with the name of your image field in the actual upload form
# Mar 13th, 16:25 this.impetus second I am looking at my project and trying to understand what you're suggesting before asking further questions
# Mar 13th, 16:25 ricksaccous hehe
# Mar 13th, 16:25 this.impetus I *definitely* need to better understand cake.. I used cake2 a *lot* once upon a time, I am totally lost with 3+
# Mar 13th, 16:25 ricksaccous you are making these configuration changes where you add the behavior, most likely in your model's initialize
# Mar 13th, 16:24 ricksaccous in the behavior set up
# Mar 13th, 16:24 ricksaccous you need to dig deeper into reading about the configuration/docs and if you're not understanding what you're reading you probably need to understand more about cake but basically your image field name has to be configured
# Mar 13th, 16:23 ricksaccous hehe
# Mar 13th, 16:23 this.impetus I don't think, sorry, that I really understand the fields option. What's their purpose/function?
# Mar 13th, 16:22 this.impetus Nope; paths exist, permissions correct
# Mar 13th, 16:22 ricksaccous but those are possible as well
# Mar 13th, 16:22 ricksaccous it could be a number of issues, including you might not have your fields option set up correctly
# Mar 13th, 16:21 neon1024 Perhaps the folder doesn’t exist, or there is a permissions issue?
# Mar 13th, 16:20 this.impetus @ricksaccous Ok—so I looked here; I tried adding a path configuration here, but it seemed to do nothing—neither errors nor any files arriving in the designated path. Sorry I am out of my depth here but taking over a project from someone else
# Mar 13th, 16:17 ricksaccous @this.impetus https://cakephp-upload.readthedocs.io/en/latest/examples.html
# Mar 13th, 16:12 this.impetus as an added note, in the "Configuration" section of the docs there is a lot of sample code, but, I don't know where that might go in order to emulate it.
# Mar 13th, 16:10 this.impetus heyo... novice here. trying to use jose gonzlez's Upload Plugin. Have installed it, don't really understand how to configure it... uploading an image at this point "works" from the front end but the files don't seem to go anywhere
# Mar 13th, 16:08 admad cakenub: just ask your question and wait for someone to respond
# Mar 13th, 16:05 cakenub hey room.. need some cake help. anyone free?
# Mar 13th, 15:58 steinkel and https://github.com/CakeDC/auth/releases/tag/4.0.0
# Mar 13th, 15:58 ricksaccous np
# Mar 13th, 15:58 kaliel thx :slightly_smiling_face:
# Mar 13th, 15:58 kaliel oh yes sure
# Mar 13th, 15:58 ricksaccous can be a field that doesn't exist in db if it doesn't need to be saved
# Mar 13th, 15:58 kaliel i tought about it but i will have a duplicate field :S
# Mar 13th, 15:57 ricksaccous @kaliel create another field that you populate yourself with Time::now();
# Mar 13th, 15:53 kaliel I'd like to create a custom validation rule based on previous persisted entity by checking the filed 'created' populated by TimestampBehavior. Seems that TimestampBehavior adds 'created' in beforeSave so i can't validate, any idea on how to manage this please ?
# Mar 13th, 15:44 dereuromark https://github.com/dereuromark/cakephp-tinyauth/pull/97/files if anyone can help maybe?
# Mar 13th, 15:43 neon1024 Seems I can use `ini_set('user_agent', 'Daves great new user agent string')` :slightly_smiling_face:
# Mar 13th, 15:42 dereuromark yeah that one. I wanted to try to upgrade it fully to support them.
# Mar 13th, 15:41 neon1024 @dereuromark The middleware one? I haven’t tried it in a long time
# Mar 13th, 15:40 neon1024 How can I change the user-agent string from ‘CAKEPHP’ to something else for a post request using the HttpClient?
# Mar 13th, 15:40 dereuromark anyone working with authentication or more importantly authorization plugin yet? "The request to `/cars/add` did not apply any authorization checks." must be missing sth for tinyauth to work with new new plugins.
# Mar 13th, 15:05 ricksaccous thanks @neon1024;)
# Mar 13th, 15:04 neon1024 Thanks @dereuromark setting my default logging to false scope worked :thumbsup:
# Mar 13th, 15:03 neon1024 I don’t even think you *have* to pass an array, I think `where()` might take string, so you could lose the `[]` also :thinking_face:
# Mar 13th, 15:02 ricksaccous yeah i'll prob just do it that way
# Mar 13th, 15:02 ricksaccous yeah it's mysql
# Mar 13th, 15:02 neon1024 Assuming MySQL :point_up:
# Mar 13th, 15:02 ricksaccous oh wew
# Mar 13th, 15:02 neon1024 Well, if you’re doing that, why not `->where(['login_lockdown < NOW()'])`
# Mar 13th, 15:02 ricksaccous or is that evil
# Mar 13th, 15:02 ricksaccous \DateTime();
# Mar 13th, 15:01 neon1024 There is also the `->lt()` method
# Mar 13th, 15:01 ricksaccous for a quick dirty one can i just do 'login_lockdown < ' => new
# Mar 13th, 15:01 neon1024 `->where(['login_lockdown <' => $datetimeInstance])` is the approach I use
# Mar 13th, 15:01 ricksaccous but i'm never sure what's the best way
# Mar 13th, 15:01 ricksaccous i've done this different ways
# Mar 13th, 15:00 ricksaccous 'login_lockdown <' => todays date in cakephp3 terms
# Mar 13th, 15:00 ricksaccous let's say i'm querying
# Mar 13th, 15:00 neon1024 `$datetime->isToday()`
# Mar 13th, 15:00 ricksaccous datetime i should say
# Mar 13th, 15:00 ricksaccous in cake 3 what's the best way to compare a field to today's date
# Mar 13th, 15:00 neon1024 It just feels very counterintuitive to my brain
# Mar 13th, 14:58 dereuromark but nowadays you need to always enable listeners on app side for everything. no more good old "just lock to file x"
# Mar 13th, 14:58 dereuromark I had similar feelings once upgrading stuff from 2.x :slightly_smiling_face: https://sandbox.dereuromark.de/pages/best-practices#logging still is useful as default for all apps.
# Mar 13th, 14:57 neon1024 Not without writing it to a variety of handlers
# Mar 13th, 14:57 neon1024 I just want to log a message to a text file and it feels like the Log class can’t do this
# Mar 13th, 14:57 dereuromark known issue from back in 3.0, yeah. scopes need to default to false as per new app templates
# Mar 13th, 14:57 Martin` hmm never used scopes for debug
# Mar 13th, 14:56 Martin` now it works?
# Mar 13th, 14:51 neon1024 How do I make this exclusive to just exitlinks.log? Can I use this form of logging or do I need to use a different implementation
# Mar 13th, 14:51 neon1024 However, when I log using `Log::debug('Example', ['scope' => ['exitlinks']])`, it is logged to both my debug.log and exitlinks.log
# Mar 13th, 14:50 slackebot <neon1024>
# Mar 13th, 14:50 neon1024 I have configured my logging like this
# Mar 13th, 14:12 neon1024 :face_palm: I had the loads inside the cli check. Why do I only notice these things once I’ve asked the question!
# Mar 13th, 14:11 neon1024 I’ve looked at a few other plugins and they don’t implement any methods in Plugin.php, so I’m a little confused as to what I’ve missed
# Mar 13th, 14:10 neon1024 I changed my plugin to use the new plugin loading, with Plugin.php, but now my routes are missing
# Mar 13th, 12:58 admad @neon1024 you can hold off updating notEmpty() methods, new methods are coming in 3.8 :slightly_smiling_face: https://github.com/cakephp/cakephp/pull/12990
# Mar 13th, 12:19 challgren TY, Ok I’ll have to investigate it and try it out. The use case for the Password Rehash I’m just implementing the plugin so now maybe the best time to migrate
# Mar 13th, 12:19 steinkel ^ 8.4.0 released btw
# Mar 13th, 12:19 steinkel @challgren yes, we are migrating internal projects to test it now
# Mar 13th, 12:17 neon1024 Answers on a postcard ;)
# Mar 13th, 12:17 neon1024 Actually looking at it, that could be improved to be more robust!
# Mar 13th, 12:17 neon1024 replace with `->allowEmptyString($1, $2)$3`
# Mar 13th, 12:17 neon1024 Maybe helpful to others :slightly_smiling_face:
# Mar 13th, 12:17 neon1024 If you’re using search and replace `->allowEmpty\(([\w']+),\s([\w']+)\);`
# Mar 13th, 12:11 neon1024 Updating deprecated `notEmpty` and `allowEmpty` is a real time sync pita
# Mar 13th, 12:07 challgren Is it beta quality?
# Mar 13th, 12:04 steinkel you could prefer migrating first to the new version and adding features there instead...
# Mar 13th, 12:04 steinkel take a look at develop branch