Logs for #cakephp

Page 1 of 36,516, showing 100 records out of 3,651,584 total, starting on record 1, ending on 100

# At Username Text
# Yesterday, 23:59 rightscoreanalysis I solved it - thanks :)
# Yesterday, 23:52 rightscoreanalysis namespace App\Controller\Admin;
# Yesterday, 23:51 challgren And if your namespace on the PurchaseController correct
# Yesterday, 23:51 rightscoreanalysis I have admin routes set up
# Yesterday, 23:51 challgren Is your controller in /src/Controller/Admin/PurchasesController
# Yesterday, 23:51 rightscoreanalysis but buyer in this case is a param not action
# Yesterday, 23:51 rightscoreanalysis I am getting an error: Action PurchasesController::buyer() could not be found
# Yesterday, 23:50 rightscoreanalysis admin/purchases/buyer
# Yesterday, 23:50 rightscoreanalysis on another note I have this url:
# Yesterday, 23:48 challgren you could try curl verbose to see if its redirecting correctly
# Yesterday, 23:47 rightscoreanalysis I am not auth'd so should be redirected to login
# Yesterday, 23:47 rightscoreanalysis sorry - login
# Yesterday, 23:47 rightscoreanalysis logout
# Yesterday, 23:46 challgren login or out?
# Yesterday, 23:45 rightscoreanalysis I tried an incognito browser sesssion and still not redirected to the correct logout url
# Yesterday, 23:36 challgren @dereuromark cant sleep?
# Yesterday, 23:29 rightscoreanalysis ok will try - btw I had plugin in my array alreafy, I switched that out for prefix - didn't think to try them both!
# Yesterday, 23:28 challgren your redirect maybe cached in your browser
# Yesterday, 23:28 rightscoreanalysis hi @dereuromark btw
# Yesterday, 23:28 rightscoreanalysis but still redirected to admin/
# Yesterday, 23:27 slackebot <rightscoreanalysis>
# Yesterday, 23:27 rightscoreanalysis so my array is now
# Yesterday, 23:21 dereuromark @rightscoreanalysis https://github.com/dereuromark/cakephp-tools/blob/master/src/View/Helper/UrlHelper.php#L86 is the reason I use such helper methods a lot inside layouts as well. in your case you need it for the Auth config array URLs.
# Yesterday, 23:20 MrEm Well, I think my perspective is less about finding a trick, but more about thinking of collections as a whole - rather than a sum of parts, i fthat makes sense
# Yesterday, 23:20 dereuromark alan-a: always set up your login routes with proper defaults.
# Yesterday, 23:20 rightscoreanalysis admin/user/login is not found
# Yesterday, 23:19 rightscoreanalysis when I try to access a route which I do not have access to: /admin/users/index my app attempts to redirect to login, but it goes to admin/users/login - not users/login
# Yesterday, 23:19 dereuromark Any Hash or collection trick would do the same, but it might not be worth trying to find those until they work as expected.
# Yesterday, 23:18 dereuromark or other helper methods somewhere. dont be afraid of some loops, as long as they are wrapped inside a method cleanly.
# Yesterday, 23:17 MrEm Yeah, I think that would make sense
# Yesterday, 23:14 dereuromark loaded = contained
# Yesterday, 23:14 dereuromark I throw an exception if the events havent been loaded (developer error, if null)
# Yesterday, 23:13 MrEm Hm, that's a possibility
# Yesterday, 23:11 dereuromark ->events() etc here
# Yesterday, 23:10 dereuromark you can always write small methods on the entity to fetch sub parts the way you want them.
# Yesterday, 23:08 MrEm Or do I have to foreach ($reservations as $reservation) { $events []= $reservation->events
# Yesterday, 23:08 MrEm Then can I do something like $reservations->events
# Yesterday, 23:08 MrEm So: $reservations = $this->Reservations->find('all' ....
# Yesterday, 23:07 MrEm Like if I do a find('all') on, say Reservations, and with Reservations I "contain" Events (which are associated)
# Yesterday, 23:07 MrEm Does Cake have a built in way, on a Collection, to get all the associated records in one go, or do I need to loop through the collection and collect them manually?
# Yesterday, 22:13 ricksaccous makes sense
# Yesterday, 21:51 challgren 3.5 to 4.x isnt that much of a change but better type defined.
# Yesterday, 21:51 challgren Yeah, mainly due to typing the functions thats only supported in php 7.1+
# Yesterday, 21:50 ricksaccous i'm guessing that's what you mean or am i wrong composer wise as well?
# Yesterday, 21:50 ricksaccous but he prob changed more of the plugin for the 4.0.0-beta tag, heh
# Yesterday, 21:49 ricksaccous i thought that was an or so it would be from 3.5 <= 3.9 or 4.0 +
# Yesterday, 21:49 ricksaccous oh really? dayum
# Yesterday, 21:27 challgren And also FYI cake 3.x plugins will never work with 4.x without some modification so ^3.5|^4.0 will not work
# Yesterday, 21:04 ricksaccous thank you kindly
# Yesterday, 21:04 ricksaccous okay i'll just delete it
# Yesterday, 21:03 challgren Yeah your PR is on master but theres a cake-4.x that has the correct constraints
# Yesterday, 21:03 ricksaccous yeah that works
# Yesterday, 21:03 challgren try 4.0.0-beta
# Yesterday, 21:03 ricksaccous Problem 1 - The requested package admad/cakephp-glide 4.0.0@beta exists as admad/cakephp-glide[1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.x-dev, 2.0.0, 3.0.0, 3.0.1, 3.0.2, 3.1.0, 4.0.0-beta, dev-cake-4.x, dev-master] but these are rejected by your constraint.
# Yesterday, 21:01 ricksaccous okay, should i just remove the pr then?
# Yesterday, 21:01 challgren Change your glide version to 4.0.0@beta
# Yesterday, 21:01 ricksaccous i'm not that good with composer
# Yesterday, 21:00 ricksaccous is that why it's not working? lol
# Yesterday, 21:00 ricksaccous min-stability: "dev"
# Yesterday, 21:00 ricksaccous yeah
# Yesterday, 21:00 challgren Theres a 4.0.0@beta available
# Yesterday, 20:59 challgren @ricksaccous you have min-stability: dev in composer.json?
# Yesterday, 20:31 ricksaccous heh
# Yesterday, 20:31 ricksaccous put in a PR
# Yesterday, 20:25 ricksaccous sorry i should have linked the plugin: https://github.com/ADmad/cakephp-glide
# Yesterday, 20:24 ricksaccous @admad does this work for cakephp4? composer is throwing a fit for me Can only install one of: cakephp/cakephp[3.x-dev, 4.x-dev]. - Can only install one of: cakephp/cakephp[3.x-dev, 4.x-dev]. - admad/cakephp-glide 3.1.0 requires cakephp/cakephp ^3.5 -> satisfiable by cakephp/cakephp[3.x-dev]. - Installation request for admad/cakephp-glide ^3.1 -> satisfiable by admad/cakephp-glide[3.1.0]. - Installation request for
# Yesterday, 20:24 slackebot cakephp/cakephp 4.x-dev -> satisfiable by cakephp/cakephp[4.x-dev].
# Yesterday, 19:57 ndm Actually the `provider` option and `setProvider()` go hand in hand, I mixed something up there
# Yesterday, 19:54 ndm https://book.cakephp.org/4/en/core-libraries/validation.html#using-custom-validation-rules https://book.cakephp.org/4/en/core-libraries/validation.html#adding-validation-providers
# Yesterday, 19:54 ndm Also you can use custom validation providers, either per rule using the `provider` option, or per validator by setting it via `Validator::setProvider()`
# Yesterday, 19:53 ndm More like `$validator->add('password', ['rule' => [$this, '_isPasswordValue']]);`, assuming it's a method on the containing object. The `rule` option generally accepts callables, ie also closures.
# Yesterday, 19:47 wizardfix (v. 3.8) I'm trying to set up password validation. I have written a function, `_isPasswordValid()`, that tests if a password is valid according to character requirements, so I need to make a rule that my validator calls this function. How do I do this? Something like `$validator->add('_isPasswordValid', ['field' => 'password']);` ? :thinking_face:
# Yesterday, 19:39 ndm no problem
# Yesterday, 19:33 FunkadelicRelic Got it! Thank you @ndm - again....
# Yesterday, 19:24 ndm If you're using the form helper, then you need to make sure that the option for the control is a `key => value` array, where the `key` is the value that you want to be passed, the `value` is the label that you want to display.
# Yesterday, 19:16 FunkadelicRelic I think $data['recommendationgroup_id'] may be coming in wrong from the dropdown in my add form. Thinking maybe I'm pulling in 0 instead of 1 for the first dropdown item.
# Yesterday, 19:13 ndm If the number would be used at all, and not just interpreted as array index
# Yesterday, 19:12 ndm Not sure what exactly you mean by "_backwards results_", if it's sorting, then you need to order accordingly, as the default order of the DBMS can be rather non-deterministic. Have the condition the other way around however certainly shouldn't work at all, as it would compare a integer against a string, like `WHERE 1 = 'recommendation_group_id'`.
# Yesterday, 19:08 FunkadelicRelic One interesting thing is that if I flip the where as mentioned, I seem to get backwards results, but that could just be my statement, I'll have a quick look.
# Yesterday, 19:07 FunkadelicRelic Well that certainly looks better!
# Yesterday, 19:03 FunkadelicRelic Ah good catch - I was still on toArray. I'll try now.
# Yesterday, 19:01 ndm btw your `where()` array should be flipped, it should be like `where(['recommendation_group_id' => $data['recommendationgroup_id'])`
# Yesterday, 19:00 challgren https://cakesf.herokuapp.com/ is the link to get an invite
# Yesterday, 19:00 ndm Have you changed from using `all()`?
# Yesterday, 18:58 FunkadelicRelic Slack sounds like a great idea! I get a new error on that line now @ndm. Call to a member function extract() on array
# Yesterday, 18:54 ndm `all()` will return a result set, which implements the collection interface. Try `$data['recommendations']['_ids'] = $query->extract('id')->toArray();`.
# Yesterday, 18:54 ndm Not sure how a quote translate to IRC, so here it is again just in case
# Yesterday, 18:52 slackebot <ndm>
# Yesterday, 18:52 ndm If you'd use slack you'd see the missed messages :)
# Yesterday, 18:51 FunkadelicRelic So it looks like it is trying to convert array to int which is failing.
# Yesterday, 18:50 FunkadelicRelic Whoops - disconnected.
# Yesterday, 18:47 ndm `all()` will return a result set, which implements the collection interface. Try `$data['recommendations']['_ids'] = $query->extract('id')->toArray();`.
# Yesterday, 18:44 ricksaccous Oh
# Yesterday, 18:43 FunkadelicRelic .
# Yesterday, 18:43 FunkadelicRelic array
# Yesterday, 18:43 FunkadelicRelic If I just do $query, I then get Cannot convert value of type
# Yesterday, 18:43 FunkadelicRelic to integer
# Yesterday, 18:39 FunkadelicRelic Sorry, I don't really understand. I don't recall deliberately writing to session anywhere. If I do $data['recommendations']['_ids'] = [1, 2]; then it saves perfectly so I guess it's something in the block of code I pasted above?
# Yesterday, 18:38 ricksaccous check it in debug
# Yesterday, 18:38 ricksaccous if all ur selecting is id, I think...