Logs for #cakephp

Page 13 of 36,521, showing 100 records out of 3,652,073 total, starting on record 1,201, ending on 1,300

# At Username Text
# Feb 14th, 03:25 lpj145 i tested with a new project 4.x its works very well with php 7.4.
# Feb 14th, 03:25 lpj145 @ndm maked for cakephp > 3.2
# Feb 14th, 03:24 lpj145 https://github.com/lpj145/express-request
# Feb 13th, 22:13 sebastian.krzewinski. i solve it
# Feb 13th, 22:13 sebastian.krzewinski. nevermind
# Feb 13th, 22:13 sebastian.krzewinski. 4
# Feb 13th, 21:47 ricksaccous you are using cakephp3 right?
# Feb 13th, 21:46 ricksaccous it only takes 2 parameters
# Feb 13th, 21:46 ricksaccous @sebastian.krzewinski. https://book.cakephp.org/3/en/views/helpers/form.html#creating-form-controls
# Feb 13th, 21:44 sebastian.krzewinski. ok its working when i do form->input not control
# Feb 13th, 21:36 sebastian.krzewinski. but not in form
# Feb 13th, 21:36 sebastian.krzewinski. then how should be looks like? in other place its working
# Feb 13th, 21:29 ricksaccous you have placeholder in a separate array as the third parameter
# Feb 13th, 21:29 ricksaccous array of options is one parameter
# Feb 13th, 21:28 sebastian.krzewinski. <?= $this->Form->control('email', ['required' => true],['placeholder' => 'test']) ?> anyone know why this placeholder is not working?
# Feb 13th, 21:27 sebastian.krzewinski. i have maybe stupid Question again :)
# Feb 13th, 20:55 sebastian.krzewinski. its wokrking <3
# Feb 13th, 20:54 sebastian.krzewinski. ok i will try it
# Feb 13th, 20:41 ndm That's untested, but generally that's how you could do it
# Feb 13th, 20:40 ndm ```$passed = $this->request->getParam('pass'); $allowed = ['home', 'foo', 'bar', 'baz']; if(isset($passed[0]) andand in_array($passed[0], $allowed)) { $this->Authentication->addUnauthenticatedActions(['display']); }```
# Feb 13th, 20:37 ndm There are no `index` and `view` actions in your `PagesController`, there's only a single action named `display` which handles access to all pages by evaluating the passed page name. You'd have to check the current name, and allow access to the `display` action instead. Something like
# Feb 13th, 20:34 sebastian.krzewinski. https://i.imgur.com/onvqt44.gifv
# Feb 13th, 20:31 ndm What do these two things even have to do with each other? It's hard to follow without additional explanation of what's actually happening
# Feb 13th, 20:30 sebastian.krzewinski. idk..
# Feb 13th, 20:30 sebastian.krzewinski. its seems to be not working: $this->Authentication->addUnauthenticatedActions(['index', 'view']); in pages
# Feb 13th, 20:28 sebastian.krzewinski. but now i cant join to homepage
# Feb 13th, 20:27 sebastian.krzewinski. i used this method for new login page: $this->viewBuilder()->setLayout('login');
# Feb 13th, 20:18 sebastian.krzewinski. coool
# Feb 13th, 20:18 sebastian.krzewinski. go sleep for a while .. back and you see not working auth
# Feb 13th, 20:17 sebastian.krzewinski. ...wtf
# Feb 13th, 19:00 ricksaccous oh ok kewl
# Feb 13th, 18:59 alexmax they'll have information persisted across postbacks and they show up in request data as an array
# Feb 13th, 18:58 alexmax actually you can create form fields with dotted names and do the "multi" yourself
# Feb 13th, 18:35 ricksaccous if they aren't being saved it's fine to just say it's a string (I think) and then specify them as multiselect in the form
# Feb 13th, 18:33 ricksaccous you can multiselect them?
# Feb 13th, 18:23 alexmax In a modelless form, what is the appropriate schema to use for a field of array type (a field like `foo.bar`)
# Feb 13th, 16:43 sebastian.krzewinski. :)
# Feb 13th, 16:35 sebastian.krzewinski. this auth making me redirection loop...
# Feb 13th, 16:24 ricksaccous or something
# Feb 13th, 16:24 ricksaccous i think that's used for checkboxes instead of label
# Feb 13th, 16:24 ricksaccous i'm shooting in the dark but that confused me for a bit too
# Feb 13th, 16:23 ricksaccous nestingLabel
# Feb 13th, 16:23 ricksaccous @alexmax are you aware of nestinglabel?
# Feb 13th, 16:20 sebastian.krzewinski. in pagescontroler
# Feb 13th, 16:20 sebastian.krzewinski. adding *public* *function* beforeFilter(\*Cake*\*Event*\*EventInterface* $event)     {         *parent*::beforeFilter($event);         $this->Authentication->allowUnauthenticated(['index', 'display']);             }
# Feb 13th, 16:20 sebastian.krzewinski. ok.... i solvet it
# Feb 13th, 16:08 sebastian.krzewinski. ```$this->Authentication->allowUnauthenticated(['??????????']);```
# Feb 13th, 16:07 sebastian.krzewinski. for now i can log in. but auth is working on all app
# Feb 13th, 16:07 sebastian.krzewinski. and create new login place
# Feb 13th, 16:06 sebastian.krzewinski. how to allow home and pages to not auth?
# Feb 13th, 15:49 alexmax Yeah this really does seem like it's forgotten about, because taking a closer look at the generated HTML for the checkboxes, not only am I seeing no labels, but I'm seeing all of the options crammed into an `options` attribute in the input tag, which isn't even wrong.
# Feb 13th, 15:48 alexmax so I can create an issue out of it.
# Feb 13th, 15:47 alexmax Maybe I'll spend a little time and crank out a minimal reproduction when I have a moment.
# Feb 13th, 15:46 alexmax Seems to me that either there should be a default template for `checkboxContainer` or `multiple => checkbox` should do something different than what it's doing now, and I'm not sure which is the correct play.
# Feb 13th, 15:46 alexmax Well I'm not sure what the correct behavior is here. I was just pointing it because it might be some corner case functionality that was forgotten about, and maybe these tests can be changed to something else that is the intended behavior.
# Feb 13th, 15:45 noel If it's in the test suite then maybe you can just copy it from there and do a PR?
# Feb 13th, 15:44 alexmax Strangely enough, the only time I can find this template by name is in the test suite
# Feb 13th, 15:44 alexmax https://github.com/cakephp/cakephp/search?q=checkboxContainer&unscoped_q=checkboxContainer
# Feb 13th, 15:43 alexmax Wonder if that version has the same problem.
# Feb 13th, 15:43 alexmax We're in the process of upgrading to 3.8 anyway
# Feb 13th, 15:43 noel @sebastian.krzewinski. depends on whether you're using cakePHP 3.8 or 4.
# Feb 13th, 15:42 alexmax Yeah but again, 3.5, old version, probably not supported, yada yada yada
# Feb 13th, 15:42 noel @alexmax It does sound broken to me. Sounds like the code was designed to look for a container when you specify `multiple` but that wasn't implemented for checkbox.
# Feb 13th, 15:41 sebastian.krzewinski. better use book from cake 3.8 then 4?
# Feb 13th, 15:41 neon1024 https://book.cakephp.org/3/en/views/helpers/form.html#customizing-the-templates-formhelper-uses
# Feb 13th, 15:40 alexmax Yeah I found it very odd that it was looking for a template that literally did not exist (or at least I couldn't find)
# Feb 13th, 15:40 neon1024 I tend to do this if I need to change the odd field in a single form. If I need it elsewhere I make a templates file
# Feb 13th, 15:40 neon1024 You can use `$this->Form->setConfig('templates.checkbox', $myNewTemplate)`
# Feb 13th, 15:39 neon1024 I tend to replace this https://github.com/cakephp/cakephp/blob/3.5.18/src/View/Helper/FormHelper.php#L106
# Feb 13th, 15:39 alexmax Cake 3.5 btw
# Feb 13th, 15:38 alexmax Without one, I get an error message saying it can't find a template for `checkboxContainer`. Should there be one?
# Feb 13th, 15:37 neon1024 @alexmax Are you giving a custom template string to the Form->setTemplate ?
# Feb 13th, 15:36 alexmax when you want "at least one of these checkboxes"
# Feb 13th, 15:35 alexmax Man I hope I don't have to resort to three separate fields again, validation and error rendering on those is a pain in the neck
# Feb 13th, 15:35 sebastian.krzewinski. i dont get.. do all with docs.. not work.. add 1 line and everything fine
# Feb 13th, 15:35 alexmax Hrm, even when I supply a basic template for `checkboxContainer` the resulting HTML is lacking - the checkboxes are missing labels.
# Feb 13th, 15:33 dereuromark true :) ignore deprecations
# Feb 13th, 15:32 spriz AuthComponent is also still working all good :v:
# Feb 13th, 15:31 dereuromark good old days where you used TinyAuth and 3 lines of config and all worked fine.
# Feb 13th, 15:30 sebastian.krzewinski. im done for today.. this docs not working (auth)
# Feb 13th, 15:27 spriz I like the first one better, and that was the one I have used the most but I've been confused since the 2nd was added :shrug:
# Feb 13th, 15:27 neon1024 Seriously @spriz No idea! :thinking_face: Probably the first option? It’s readable
# Feb 13th, 15:26 dereuromark darn, he was faster
# Feb 13th, 15:26 dereuromark actually, make it a separate class and inject it.
# Feb 13th, 15:26 neon1024 Injected via DI container
# Feb 13th, 15:26 neon1024 Wrap it in a private method too
# Feb 13th, 15:26 neon1024 So I pick option 2
# Feb 13th, 15:25 neon1024 More code means you’re working harder, so you get paid more :pokerface:
# Feb 13th, 15:25 spriz Which one do you use - why? :)
# Feb 13th, 15:24 spriz ``` $this->request = $this->request->withData('foo', 'bar');
# Feb 13th, 14:42 damiano ok
# Feb 13th, 14:40 noel The way I've done that in the past is in AppController... there I check the path in `$_SERVER['REQUEST_URI']` and set a viewVar if it is the home page.
# Feb 13th, 14:38 damiano so i need to find a way to understanrd if it is the home page or not, or maybe i just set('home', 1) inside the index() action and stop
# Feb 13th, 14:38 damiano i must load different classes
# Feb 13th, 14:38 damiano @noel it is a view problem, if it is the home page the header is different
# Feb 13th, 14:37 noel er.. sorry that posted while I was still thinking about it. pls ignore.
# Feb 13th, 14:36 noel @damiano I think you're approaching this in the wrong way. The way I would do that is in the AppController and use it to layout
# Feb 13th, 14:35 alexmax So I've got a question. I don't use `'type' => 'select', 'multiple' => 'checkbox'` with the formHelper terribly often, and I'm getting an error message saying that there is no `checkboxContainer` template. Is this expected? Does CakePHP simply not come with a built-in `checkboxContainer` template? Is that even the correct template for it to grab? Or is this likely something in my app breaking things?
# Feb 13th, 14:35 damiano so basically two different header so i woukld like to check automatically what class i should use looking at the current route/page
# Feb 13th, 14:34 damiano because in the header of my template i have different classes