Logs for #cakephp

Page 3 of 36,308, showing 100 records out of 3,630,750 total, starting on record 201, ending on 300

# At Username Text
# Sep 21st, 16:53 peppejaripappalardo thx anyway
# Sep 21st, 16:53 peppejaripappalardo np @destinydriven
# Sep 21st, 14:22 destinydriven Sysmo, sorry I can’t be of much help
# Sep 21st, 10:04 peppejaripappalardo thx @destinydriven i saw it, but the error persist
# Sep 21st, 09:24 destinydriven @peppejaripappalardo ^
# Sep 21st, 09:20 destinydriven You have duplicate key ‘duration’
# Sep 21st, 09:18 peppejaripappalardo some hint please? :S
# Sep 21st, 09:18 peppejaripappalardo `'_cake_core_' => [` ` 'className' => RedisEngine::class,` ` 'prefix' => 'myapp_cake_core_',` ` 'path' => CACHE . 'persistent/',` ` 'serialize' => true,` ` 'duration' => '+1 years',` ` 'host' => 'gjnas.serveftp.com',` ` 'password' => '*****',` ` 'database' => 0,` ` 'port' => 6379,` ` 'duration' => '+24 hours',` `
# Sep 21st, 09:18 slackebot ],`
# Sep 21st, 09:18 peppejaripappalardo `Cache engine Cake\Cache\Engine\RedisEngine is not properly configured`
# Sep 21st, 09:18 peppejaripappalardo Got an issue with cache
# Sep 21st, 09:18 peppejaripappalardo Hi all
# Sep 21st, 09:07 destinydriven Elasty, thanks. Reciprocated
# Sep 21st, 09:04 adam282 True. I don’t use it absolutely every where though I try my best to. Sorry I couldn’t help any better. I am out, have a good one.
# Sep 21st, 09:04 destinydriven No worries, there’s no law saying that FormHelper has to be used all the time
# Sep 21st, 09:03 destinydriven same difference
# Sep 21st, 09:02 destinydriven yes
# Sep 21st, 09:02 adam282 Oh, well no cause you said it works without form builder
# Sep 21st, 09:02 adam282 It might not be Cake interpreting it but PHP
# Sep 21st, 09:01 adam282 Try `echo $this->Form->hidden("DailyHour.{$i}.employee_id", ['value' => $key, 'id' => false]);`
# Sep 21st, 09:00 destinydriven yes, exactly
# Sep 21st, 09:00 adam282 CakePHP is interpreting `<%= key %>` instead of showing that exactly
# Sep 21st, 09:00 adam282 Oh, I see what you’re saying.
# Sep 21st, 08:59 destinydriven echo “<input name=‘data[DailyHour][{$i}][employee_id]’ class=‘form-control’ value=‘{$key}’ type=‘hidden’>“; works just fine
# Sep 21st, 08:59 destinydriven I can get it to work by not using FormHelper though. Was just wondering
# Sep 21st, 08:59 adam282 Looks like a wanna jQuery
# Sep 21st, 08:59 destinydriven thanks for the attempt :)
# Sep 21st, 08:58 adam282 Hm, never worked with it. Sorry.
# Sep 21st, 08:58 adam282 I would do `<?php echo $key; ?>`
# Sep 21st, 08:58 destinydriven Elasty, its a template variable from underscore js
# Sep 21st, 08:58 adam282 I don’t use short open tags
# Sep 21st, 08:58 adam282 Or something like that.
# Sep 21st, 08:58 adam282 Should be `<?php= $key ?>`
# Sep 21st, 08:58 adam282 That’s because you’re missing `$` if it’s a variable
# Sep 21st, 08:58 destinydriven yeah, view source has <%= key %>
# Sep 21st, 08:57 adam282 Um, view the source and you should see a hidden field
# Sep 21st, 08:57 destinydriven its returning <%= key %> instead of the value
# Sep 21st, 08:57 adam282 What do you mean by properly process?
# Sep 21st, 08:56 destinydriven In Cake2 is there any way to get FormHelper is properly process a template variable like $key : ‘<%= key %>’; echo $this->Form->hidden(“DailyHour.{$i}.employee_id”, [‘value’ => “{$key}“, ‘id’ => false]);
# Sep 21st, 08:46 adam282 Oh, and one Authors Controller, if needed.
# Sep 21st, 08:46 adam282 One Authors table, one Authors model, one Author Entity…
# Sep 21st, 08:46 adam282 Then why would you need a prefix?
# Sep 21st, 08:45 jotpe For now, they don't.
# Sep 21st, 08:42 adam282 Hm, do the other plugins contain the same tables? If so, you really should rethink your structure.
# Sep 21st, 08:41 jotpe I guess I'll just change the setTable() in my Model.
# Sep 21st, 08:40 jotpe I mean: In my db it could get messy if I have authors, speakers etc. and this is just for one plugin (I have 20 more to migrate). Would be good to have db tables like cfp_authors but in my Application have just a Authors Model.
# Sep 21st, 08:37 adam282 Well, a table prefix would apply to the entire app and all tables.
# Sep 21st, 08:36 jotpe Is there something like a table prefix? Since I have a lots of models I want to group them to the corresponding plugin.
# Sep 21st, 08:25 adam282 You’re very welcome
# Sep 21st, 08:24 jotpe This was lots of help :slightly_smiling_face:
# Sep 21st, 08:24 jotpe Okay, thanks so much :slightly_smiling_face:
# Sep 21st, 08:23 adam282 Well, I am out of suggestions then. Sorry bud
# Sep 21st, 08:23 adam282 Oh, I see.
# Sep 21st, 08:22 jotpe I guess it's a bit of a requirement to readd them. I can't expose a list of authors, since this will be publicly available. Also people should have different organizations, not just one. Also the db data is truncated once a year.
# Sep 21st, 08:20 adam282 On the add talk page, provide a drop down of the current people (you can have three different lists if need be) and next to it put a plus button. Let the user choose the person from the list and click the button to actually add that user to the talk (maybe by way of AJAX?). Then, put another button that opens a modal window to add someone not already in the database.
# Sep 21st, 08:19 jotpe comments will be users, so in this case saving the Authors didn't work
# Sep 21st, 08:19 adam282 That’s not really a good idea. It will make the database grow and be unorganized and have multiple duplicates. There’s a much better way to do this and that is with associations.
# Sep 21st, 08:19 jotpe https://book.cakephp.org/3.0/en/orm/saving-data.html#converting-request-data-into-entities
# Sep 21st, 08:19 jotpe My request data looks something like this
# Sep 21st, 08:19 jotpe So i just readd them
# Sep 21st, 08:19 jotpe Yes, people can have different organization affiliations.
# Sep 21st, 08:18 adam282 Okay, but what if you have a new talk and a person already exists in the database table? You’re going to add them again?
# Sep 21st, 08:18 jotpe yes
# Sep 21st, 08:18 adam282 Like first name, last name, etc?
# Sep 21st, 08:18 jotpe yes
# Sep 21st, 08:17 adam282 Okay, so there are fields?
# Sep 21st, 08:17 jotpe The author is added in that form, not from a list. To add a author no new view is rendered. It's just the same form.
# Sep 21st, 08:16 adam282 No problem. I am learning CakePHP 3.x so I feel your pain.
# Sep 21st, 08:15 jotpe Thanks for your help! ;) I'm just learning
# Sep 21st, 08:15 adam282 Sorry if I am not being of much help.
# Sep 21st, 08:15 adam282 So either use a button to add a new person or a drop down with an auto select or something.
# Sep 21st, 08:14 adam282 Okay, so that’s easy.
# Sep 21st, 08:14 adam282 When submitted, provided the data is formatted properly and the associations are set up in the model, it should just work.
# Sep 21st, 08:14 jotpe There's on form to add a talk, within this form you can add Authors, Speakers, ...
# Sep 21st, 08:14 adam282 So, in one of my apps I have an option for a subscription to be part of multiple distribution lists. To select distribution lists, there’s a multiple select box: ``` <?php echo $this->Form->input('DistributionList', array('type' => 'select', 'empty' => false, 'options' => $lists, 'class' => 'form-control selectpicker', 'id' => 'distribution_list', 'multiple' => true, 'size' => '10')); ?> ```
# Sep 21st, 08:13 adam282 Hm, I don’t quite understand.
# Sep 21st, 08:13 jotpe I add a talk and from this form the user can add authors
# Sep 21st, 08:12 adam282 Hm, what do you mean? How’s the interface designed? Are you going to a talk and adding people from there or are you going to people and adding talks? I mean, either way, it shouldn’t be that difficult.
# Sep 21st, 08:11 jotpe Yes, I ended up having some model associations like this. But When I want to add a talk by form it gets messy. Can't just add $requestdata = ['talk.title' ='XYZ', 'authors => ['first_name' => 'Test', ...]
# Sep 21st, 08:09 adam282 And this is only if `people` can belong to more than one `talk`. If not, you can simply this by removing `talks_peoples` and adding a `talk_id` to the `peoples` table.
# Sep 21st, 08:08 adam282 Disclaimer: I have done this in CakePHP 2.x but not 3.x so there might be some differences.
# Sep 21st, 08:08 adam282 Then, `talks_peoples` (not sure those are named according to conventions so verify them) would contain the `talk_id` and the `people_id` and then the `people` would be tied back to a role via their `people_role_id` which comes from `people_roles`
# Sep 21st, 08:07 adam282 Should be something like that
# Sep 21st, 08:07 adam282 ``` CREATE TABLE `talks` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `call_for_paper_id` int(11) unsigned NOT NULL DEFAULT '1', `category_id` int(11) unsigned NOT NULL DEFAULT '1', `title` varchar(255) DEFAULT NULL, `created` datetime DEFAULT NULL, `modified` datetime DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `talks_peoples` ( `people_id` int(11) DEFAULT NULL, `talk_id` int(11)
# Sep 21st, 08:07 slackebot DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `peoples` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `people_role_id` int(11) unsigned NOT NULL DEFAULT '1', `first_name` varchar(32) DEFAULT NULL, `last_name` varchar(32) DEFAULT NULL, `organization` varchar(96) DEFAULT NULL, `created` datetime DEFAULT NULL, `modified` datetime DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE
# Sep 21st, 08:07 slackebot `people_roles` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(32) DEFAULT NULL, `description` longtext DEFAULT NULL, `created` datetime DEFAULT NULL, `modified` datetime DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; ```
# Sep 21st, 08:05 jotpe I tried with a person Model and add a Role to that person. But I can't use save it from the form then.
# Sep 21st, 08:03 adam282 Hm, shouldn’t be that difficult.
# Sep 21st, 08:03 jotpe In my Controller I need to save a talk with the corresponding Authors.
# Sep 21st, 08:03 jotpe Since Author, Spaker and Submitter share the same Information i tried to add a role, but it didn't work that well.
# Sep 21st, 08:02 slackebot <jotpe>
# Sep 21st, 08:01 jotpe Morning, folks. I_ve got a problem with associations:
# Sep 21st, 07:59 adam282 There, got it.
# Sep 21st, 07:59 adam282 Hm
# Sep 21st, 07:59 slackebot Action: admad yawns
# Sep 21st, 07:57 adam282 I might make this kick out an automated e-mail when a new build/release is uploaded as well.
# Sep 21st, 07:56 adam282 Right now, I upload them to S3 and then give them the link to S3 and then make the item private once downloaded but that sucks.
# Sep 21st, 07:56 adam282 This app should be a quick build. Very simple. Users, Applications, Application Builds, Application Releases, Clients. Tie a Client to an App and Builds/Releases to an App, upload the Build/Release to S3 and then be able to provide the Client a link that is not directly to S3 so they can download their mobile app builds/releases
# Sep 21st, 07:55 adam282 Haha, nah, decided not to
# Sep 21st, 07:55 adam282 Guessing that’s an `innerAttrs`