Logs for #cakephp

Page 1 of 36,060, showing 100 records out of 3,605,988 total, starting on record 1, ending on 100

# At Username Text
# Yesterday, 20:29 joopm okey i see thank you for your patient
# Yesterday, 20:28 challgren https://book.cakephp.org/3.0/en/migrations.html#using-migrations-in-plugins
# Yesterday, 20:28 challgren https://book.cakephp.org/3.0/en/migrations.html
# Yesterday, 20:27 joopm how do you mean Migrations? I thought migrations is about conversion from cakephp 2 to cakephp 3 for example
# Yesterday, 20:26 joopm hello
# Yesterday, 20:25 challgren Migrations
# Yesterday, 20:07 joopm and interested in how to pack db files for installing the plugin later
# Yesterday, 20:07 joopm i made my first plugin
# Yesterday, 20:07 joopm hello
# Yesterday, 19:41 ricksaccous actually i didn't, rawrrrrr
# Yesterday, 19:26 ricksaccous got it working, was simpler than that
# Yesterday, 19:26 ricksaccous nevermind
# Yesterday, 19:05 ricksaccous in a hasOne
# Yesterday, 19:05 ricksaccous i would have just used sortConditions but they seem to be ignored
# Yesterday, 19:00 ricksaccous Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 262144 bytes) in /vagrant/nflf/httpdocs/vendor/cakephp/cakephp/src/Database/Query.php on line 352
# Yesterday, 18:59 ricksaccous when I'm trying to set up a hasOne relationship of the most recent record of a hasMany I'm getting exceeded memory limits
# Yesterday, 18:34 ricksaccous no problem
# Yesterday, 18:33 jnguyen thanks @ricksaccous
# Yesterday, 18:33 jnguyen its just i had to make it plural on the calls too
# Yesterday, 18:33 jnguyen ahhh okay that was it
# Yesterday, 18:31 ricksaccous that will help you i think
# Yesterday, 18:31 ricksaccous you can think of entities as just bags of data
# Yesterday, 18:31 ricksaccous and you use the table class to create and patch new entities
# Yesterday, 18:31 ricksaccous can be kind of confusing
# Yesterday, 18:31 ricksaccous loadModel() corresponds to the table class not to the entity
# Yesterday, 18:31 ricksaccous yeah
# Yesterday, 18:31 ricksaccous you just need to add an s in your controller
# Yesterday, 18:31 jnguyen ah okk
# Yesterday, 18:30 ricksaccous etc etc
# Yesterday, 18:30 ricksaccous $healthRecord = $this->HealthRecords->newEntity();
# Yesterday, 18:30 ricksaccous $this->loadModel('HealthRecords);
# Yesterday, 18:30 jnguyen its being called within another controller
# Yesterday, 18:30 ricksaccous you are calling it wrong
# Yesterday, 18:30 jnguyen ```public function test() { $this->loadModel('HealthRecord'); $HealthRecord =$this->HealthRecord->newEntity(); $data = [ 'user_id' => $this->Auth->user('id'), 'type' => 'test', 'entry' => ['test' => '1'], 'meta' => json_encode(['test' => '1']), ]; $HealthRecord = $this->HealthRecord->patchEntity($HealthRecord,$data);
# Yesterday, 18:30 slackebot2 dd($HealthRecord); //$this->HealthRecord->save($healthRecord); }```
# Yesterday, 18:30 jnguyen it isnt
# Yesterday, 18:29 ricksaccous this code isn't in a plugin is it?
# Yesterday, 18:29 jnguyen ah
# Yesterday, 18:29 ricksaccous in the controller
# Yesterday, 18:29 ricksaccous i mean
# Yesterday, 18:29 jnguyen health_records
# Yesterday, 18:29 ricksaccous so how are you calling the table?
# Yesterday, 18:28 ricksaccous oh okay
# Yesterday, 18:28 jnguyen and yeah I did use migrations to create the table
# Yesterday, 18:28 jnguyen my mistake it was HealthRecordsTable.php
# Yesterday, 18:22 ricksaccous @jnguyen also maybe use migrations in this project, after you get more of a hang of things
# Yesterday, 18:21 ricksaccous based on conventions
# Yesterday, 18:21 ricksaccous so HealthRecordsTable.php is what the table class should be called
# Yesterday, 18:20 ricksaccous it's always Table.php
# Yesterday, 18:20 ricksaccous baked that*
# Yesterday, 18:20 ricksaccous it should not have backed that
# Yesterday, 18:20 ricksaccous not Tables.php
# Yesterday, 18:20 ricksaccous HealthRecordsTable.php
# Yesterday, 18:20 ricksaccous it should have been called
# Yesterday, 18:15 jnguyen not sure pasting the code would help because the baking seems to be all correct
# Yesterday, 18:14 jnguyen ```SQLSTATE[42S02]: Base table or view not found: 1146 Table 'sparkplug.health_record' doesn't exist```
# Yesterday, 18:14 jnguyen so my exact problem is I made a table called health_records, baked the model and it produced an entity called HealthRecord.php and the table HealthRecordsTables.php. Tried to save data to it and it threw me this error
# Yesterday, 18:11 ricksaccous ie it's not finding my MagicRunes table
# Yesterday, 18:11 ricksaccous and stated exactly what the problem was
# Yesterday, 18:10 ricksaccous prob would be easier if you pasted the code in a gist or something
# Yesterday, 18:10 jnguyen ah figured
# Yesterday, 18:10 jnguyen sorry mean pluarl
# Yesterday, 18:10 ricksaccous table class should be plural
# Yesterday, 18:10 ricksaccous no
# Yesterday, 18:09 jnguyen if im correct the table itself has to be singular correct?
# Yesterday, 18:09 jnguyen Hey guys, so I just baked a model, the table is plural and the entity is singular, but im getting a base table not found because its looking for the singular version of the table
# Yesterday, 14:58 emiliano thanks a lot
# Yesterday, 14:58 emiliano my problem, is the aws elastic beanstalk jeje
# Yesterday, 14:56 jeremyharris yeah htaccess can do that
# Yesterday, 14:55 emiliano is there any way to tell you to generate all the urls in https, htaccess?
# Yesterday, 14:55 emiliano Hi guys, how are you? I'm working with cake 3.5 and aws elastic-beanstalk, is there any way to focus urls to https? When I use a json call, I generate the url in http and I have mixed content, i dont no way
# Yesterday, 14:40 feLiruc I did exactly what you said guys, I created a string with the correct index, and increment it everytime the user add one more line... but, for me this is so kluge...
# Yesterday, 14:35 ricksaccous it's really subjective and there's no set example anywhere, so you'll have to find a solution that works for you
# Yesterday, 14:35 ricksaccous use whatever js solution you think is appropriate to get n inputs
# Yesterday, 14:35 jeremyharris ^
# Yesterday, 14:35 ricksaccous and once you know how that works
# Yesterday, 14:35 ricksaccous one of a hasMany
# Yesterday, 14:35 ricksaccous yeah, i think that's what you mean, well my advice feLiruc is just focus on getting one to save
# Yesterday, 14:34 ricksaccous oh, you mean just for duplicating inputs?
# Yesterday, 14:34 jeremyharris there’s no “official” example I don’t think, but calling any controller action via ajax will load the view into the ajax layout if you are using the request handler
# Yesterday, 14:33 ricksaccous i'm not quite sure what that would entail
# Yesterday, 14:32 ricksaccous meh, but yeah, maybe i should try adding it with ajax though to be honest
# Yesterday, 14:32 feLiruc There is any example of this ajax in the controller?
# Yesterday, 14:32 ricksaccous i just organize the input into an element where you can specify the index
# Yesterday, 14:32 ricksaccous not necessarily, think i just needed a foreach to spit out the element, but yeah, it's somehting to consider
# Yesterday, 14:31 jeremyharris I typically prefer the ajax solution then there’s significantly less JS and it reuses existing pages and proven functionality
# Yesterday, 14:31 jeremyharris tough when dealing with validation errors
# Yesterday, 14:31 jeremyharris yeah I’ve done that too
# Yesterday, 14:31 ricksaccous and then duplicating it with the correct index when "adding"
# Yesterday, 14:30 ricksaccous what i've been doing recently is creating a hidden form with the input that i want to copy in a mustache template
# Yesterday, 14:30 jeremyharris if you need to make unlimited options (e.g., add one, add one), then you will need to use ajax to fetch an “add” page or use javascript to make controls. keep in mind using javascript to make controls will cause security errors if you are using the security component, so it will require more work to make it work correctly
# Yesterday, 14:29 jeremyharris ah yes, that can be a bit more tricky. here is the documentation for that: https://book.cakephp.org/3.0/en/views/helpers/form.html#creating-inputs-for-associated-data
# Yesterday, 14:28 ricksaccous lollll
# Yesterday, 14:28 ricksaccous the solution is wonky javascript
# Yesterday, 14:28 feLiruc Ohhh, my relationship is OK, the bake got it correct... my problem is to create the template with this 2 entities for the user... the fill the event, and N attendants in the same screen
# Yesterday, 14:26 jeremyharris or perhaps a belongsToMany, if attendants can be part of multiple events
# Yesterday, 14:25 jeremyharris feLiruc I think you are looking for a hasMany relationship. you can find information about it here: https://book.cakephp.org/3.0/en/orm/associations.html#hasmany-associations
# Yesterday, 13:27 feLiruc Hello guys, can anybody help me how to create an add page to create a 1 to n information? Like event and attendant...
# Yesterday, 12:19 feLiruc Hello guys... what´s the smartest way to create an add page to create a 1 to n relationship model? like, one event with a list of participants... I want to add the participants list just in 1 page.
# Yesterday, 08:02 challgren np