Logs for #cakephp

Page 2 of 34,879, showing 100 records out of 3,487,833 total, starting on record 101, ending on 200

# At Username Text
# Today, 03:43 GeoBehr Hello CakeIRC.. 2.x vet, trying to spin up on 3.x, want to use Google Sheets to write sheets from app. Composer sheets already done, trying to figure out how to reference the classes. Any pointers?
# Today, 03:36 borjahen Solved. The USBWebsever bug.
# Today, 03:12 borjahen Thanks.
# Today, 03:12 borjahen I uncomment the extension in the php.ini too.
# Today, 03:11 borjahen I get an error: Fatal error: You must enable the intl extension to use CakePHP. in C:\Users\Borja\Downloads\USBWebserver v8.6\root\webcake\config\bootstrap.php on line 25. I use Windows and I use the command 'php -m' and the extension 'intl' exists
# Today, 03:10 borjahen Hello everyone. Sorry for my bad English:
# Yesterday, 15:38 adithya @chris-andre thanks a lot!
# Yesterday, 13:37 chris-andre Can you gist me your action https://gist.github.com/ ?
# Yesterday, 13:37 joshuaso91 @chris-andre Array ( [supplier_id] => 1 [product_id] => 61 [date_entered] => 2000-00-00 00:00:00 [product_price] => 0.00 [notes] => no notes )
# Yesterday, 13:37 joshuaso91 @chris-andre nope it still doesnt save
# Yesterday, 13:36 noOne please?
# Yesterday, 13:35 joshuaso91 yea yea i know haha hold on i changed it
# Yesterday, 13:35 chris-andre No, no. Don't do that. You need to provide a value formatted the right way
# Yesterday, 13:34 joshuaso91 wait
# Yesterday, 13:34 noOne $routes->connect('/:controller/*', ['controller' => 'Departamento', ]);
# Yesterday, 13:34 noOne $routes->connect('/:controller/:action/*',['controller' => 'Departamento', ]);
# Yesterday, 13:34 noOne I really need this two lines, or how can I put this in one only?
# Yesterday, 13:34 joshuaso91 @chris-andre Array ( [supplier_id] => 1 [product_id] => 69 [date_entered] => datetime_format [product_price] => 0.00 [notes] => no notes )
# Yesterday, 13:34 noOne Hi guys.
# Yesterday, 13:33 chris-andre What is the value of your `$this->Form->control('date_entered', ['type' => 'hidden', 'value' => 'datetime_format'])`
# Yesterday, 13:32 joshuaso91 @chris-andre nope it still doesn't work haha
# Yesterday, 13:30 chris-andre I have no idea if default "CURRENT_TIMESTAMP" works.
# Yesterday, 13:30 joshuaso91 @chris-andre let me try that out
# Yesterday, 13:29 chris-andre Datetime field expects a value formated like `1000-01-01 00:00:00`
# Yesterday, 13:28 rudy1976s I would need to have the label as field property
# Yesterday, 13:28 chris-andre Post the output of `debug($your_entity)`
# Yesterday, 13:26 chris-andre Is that a debug of getData() ? The CURRENT_TIMESTAMP, something you modified before posting that debug?
# Yesterday, 13:25 rudy1976s Does cake has a way to declare table column labels directly in models ?
# Yesterday, 13:25 joshuaso91 nah it still didnt work
# Yesterday, 13:24 joshuaso91 unless i need to set a default value in my phpMyadmin
# Yesterday, 13:24 joshuaso91 weird.. it's passing the things i am looking when it's hidden. Array ( [supplier_id] => 1 [product_id] => 1 [date_entered] => CURRENT_TIMESTAMP [product_price] => [notes] => )
# Yesterday, 13:22 joshuaso91 okay let me check it
# Yesterday, 13:20 chris-andre Check if the value of your hidden field is posted `debug($this->request->getData());`, if it is there, check your entity before save.
# Yesterday, 13:18 chris-andre Have you debugged new/patched entity and save?
# Yesterday, 13:18 joshuaso91 nothing saved at all because of that hidden field @chris-andre that's why it was unsuccessfully saved
# Yesterday, 13:16 chris-andre The hidden field's value doesn't save, or does nothing save at all because of that hidden field?
# Yesterday, 13:13 joshuaso91 i won't work like i said above @chris-andre. I believe when i submit the form, it couldnt find the field values hence it failed to save
# Yesterday, 13:10 chris-andre @joshuaso91 dont you just use $this->Form->control('field', ['type' => 'hidden']) ?
# Yesterday, 13:07 iqu https://book.cakephp.org/3.0/en/core-libraries/time.html#formatting-relative-times
# Yesterday, 13:06 iqu ?
# Yesterday, 13:06 iqu cakephp uses chronos. How do i localize timeAgoInWords
# Yesterday, 13:04 joshuaso91 but i dont want to show the field if you know what i mean
# Yesterday, 13:04 joshuaso91 unless i do `echo $this->Form->control('date_entered', array ('readonly' => 'readonly'));`
# Yesterday, 13:03 joshuaso91 i used $this->Form->hidden(); but when i click submit, it wont let me add to the form
# Yesterday, 13:03 joshuaso91 hey guys, how do you hide a form field but still allow the form to add?
# Yesterday, 12:42 chris-andre Nah, wait. The docs referes to their users.php as you can see available config keys. Do the configuration in your bootstrap.php like Configure::write('Users.Social.login', true);
# Yesterday, 12:35 chris-andre A quick look on the docs says that you should create a config/users.pho file to configure the plugin
# Yesterday, 12:32 chris-andre Im on the phone right now and I dont know the plugin. Just in general, dont change anything in the vendor dir.
# Yesterday, 12:29 adithya Am I supposed to create a new users.php in my apps config directory?
# Yesterday, 12:26 chris-andre Dont change anything i the vendor dir
# Yesterday, 12:07 adithya I was trying to get cakedc users plugin up and running , I've a doubt i.e, when installing the plugin the users.php file will a new one be generated inside my cakephp app or I am supposed to configure everything in the file available in the vendor directory? Any help appreciated! Thanks in advance :grinning:
# Yesterday, 00:54 GMSteuart @rudy1976s you probably dont want to embed the jquery inline for your needs but rather write a separate javascript file to do so
# May 26th, 22:17 meder_ wait, hold that thought. this is in a transaction
# May 26th, 22:16 meder_ is there an easy way to debug ->save() not actually inserting a record?
# May 26th, 22:05 adithya Thank you @chris-andre @igreat
# May 26th, 22:04 igreat https://github.com/CakeDC/users
# May 26th, 22:03 igreat @adithya I suggest you look at CakeDC Users Plugin
# May 26th, 22:03 chris-andre @adithya This might be helpful: https://github.com/FriendsOfCake/awesome-cakephp#authentication-and-authorization
# May 26th, 22:03 adithya Any links to tutorials or plugins ?
# May 26th, 22:00 adithya Hello, I'm a beginner and I wanted to know how to add oauth based login with google and fb! How do I go about doing this ? Thanks in advance :grinning:
# May 26th, 21:39 rudy1976s but I cannot figure out how embed the jquery needed to run it
# May 26th, 21:36 rudy1976s I am just looking at the core widget
# May 26th, 21:36 GMSteuart ah, gotcha. i wont be much help then at this point unfortunately. the convo i just had with jeremy though describes a good use case for me implement a custom widget though
# May 26th, 21:27 rudy1976s I have already implemented it as an element but would like to learn widgets too
# May 26th, 21:26 GMSteuart lol, well im about to, but let me do some quick research for you, a custom widget might not be necessary for bootstrap
# May 26th, 21:25 rudy1976s I need to learn how to integrate the BootstrapSwitch as a Form widget but I found the book a bit confusing me :anyone here ahave created custom form widget ?
# May 26th, 21:20 GMSteuart rudy, i believe there is a 'required' attribute attached to each form input that is required by the model
# May 26th, 21:20 jeremyharris np, good luck
# May 26th, 21:19 GMSteuart thanks jeremy
# May 26th, 21:14 rudy1976s Hello in a form is there a way to know the required field of the model attached to that form ? I need to create a way to bind jeury clienti validation to every form without having to modify every form
# May 26th, 21:11 jeremyharris so you can either do $this->Form->input(‘check’, [‘type’ => ‘checkbox’, ‘labelOptions’ => [‘for’ => ‘test’]]) everywhere, or use templateVars (an additional array) or overwrite FormHelper::label / control or the widget
# May 26th, 21:10 jeremyharris so like $this->Form->input(‘check’, [‘type’ => ‘checkbox’, ‘labelOptions’ => [‘templateVars’ => [‘for’ => ‘test’]]])
# May 26th, 21:09 jeremyharris I think that template var needs to be passed to your label options still
# May 26th, 20:59 GMSteuart unless theres something i am missing when accessing properties inside the string template, my current template is the following: 'checkbox' => '<input class="mdl-checkbox__input" type="checkbox" name="{{name}}" id="{{name}}" {{attrs}}/>',
# May 26th, 20:59 GMSteuart 'nestingLabel' => '<label class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect" for="{{for}}">{{input}}<span class="mdl-checkbox__label">{{text}}</span></label>'
# May 26th, 20:58 GMSteuart thanks. thats probably what I will look into doing. the goal was to get MDLs checkboxes implemented.
# May 26th, 20:55 jeremyharris the widget could basically convert the existing `for` which is created by FormHelper::label
# May 26th, 20:55 jeremyharris if you want to *always* overwrite it, perhaps extending the LabelWidget or the FormHelper::control would be a better option
# May 26th, 20:54 GMSteuart $this->Form->control('is_archived', ['type' => 'checkbox']);
# May 26th, 20:54 GMSteuart i could just have:
# May 26th, 20:54 GMSteuart <?= $this->Form->control('is_archived', ['type' => 'checkbox', 'templateVars' => ['for' => 'is_archived']]); ?>
# May 26th, 20:54 GMSteuart so i can work around it by using the templateVars option, my goal was to be as lazy as possible. so instead of having:
# May 26th, 20:50 GMSteuart @jeremyharris testing
# May 26th, 20:47 jeremyharris GMSteuart have you tried passing your for into labelOptions when creating the input
# May 26th, 20:40 GMSteuart I am having trouble finding a solution to configuring the 'for' attribute in a html template of mine. I need to be able to set the attribute to the underscore version of the name rather than the hyphenated version. (e.g. instead of for="foo-bar" have for="foo_bar")
# May 26th, 20:32 jeremyharris np
# May 26th, 20:32 HenriqueMachado thanks
# May 26th, 20:32 HenriqueMachado i'll read abou link.. i unknow
# May 26th, 20:32 jeremyharris https://book.cakephp.org/3.0/en/orm/saving-data.html#saving-belongstomany-associations
# May 26th, 20:31 jeremyharris I think you’ll be better off using link() though
# May 26th, 20:31 jeremyharris the second and third param of save() are wrong but that looks closer to what you want
# May 26th, 20:30 HenriqueMachado hehehe
# May 26th, 20:30 HenriqueMachado should be like this? https://pastebin.com/7MyDDKi2
# May 26th, 20:30 jeremyharris I’d suggest going through the new ORM documentation to learn a bit about it, much has changed for the better. You jumped into something pretty complex right off the bat :)
# May 26th, 20:29 HenriqueMachado i see.. i think its working now.. i need to see how to save it now
# May 26th, 20:25 jeremyharris which should be an instance of your UsersTable because you told the association to use that
# May 26th, 20:25 jeremyharris k that’s fine. when you define the association, the first param is the “alias” so to speak, so you access it via $this->Users->Follower
# May 26th, 20:23 HenriqueMachado i have users table and users_followers table, but i dont have a followers table
# May 26th, 20:22 jeremyharris you have a UsersFollowers table? your associations don’t use that table class (though they indeed use the users_followers table itself)
# May 26th, 20:21 HenriqueMachado i've only UserTable and UsersFollowersTable