Logs for #cakephp

Page 2 of 36,061, showing 100 records out of 3,606,097 total, starting on record 101, ending on 200

# At Username Text
# Yesterday, 09:21 dereuromark ^^ that part he sure knows
# Yesterday, 09:20 challgren $table->find()
# Yesterday, 09:19 birdy247 I am trying to do create a query
# Yesterday, 09:19 birdy247 Morning
# Yesterday, 08:13 spriz @acosonic depending on complexity - if you’re mostly looking for basic CRUD stuff you could look into `crud` and `crud-view`
# Yesterday, 08:10 dereuromark no
# Yesterday, 08:09 scuadra Hello. Is it possible to use afterSave() callback on updateAll() in Cake 3.7?
# Yesterday, 07:55 narendravaghela I use this - https://keenthemes.com/metronic/
# Yesterday, 07:35 acosonic Hi all, any backend theme you are recommending? For /admin purposes?
# Mar 19th, 20:29 joopm okey i see thank you for your patient
# Mar 19th, 20:28 challgren https://book.cakephp.org/3.0/en/migrations.html#using-migrations-in-plugins
# Mar 19th, 20:28 challgren https://book.cakephp.org/3.0/en/migrations.html
# Mar 19th, 20:27 joopm how do you mean Migrations? I thought migrations is about conversion from cakephp 2 to cakephp 3 for example
# Mar 19th, 20:26 joopm hello
# Mar 19th, 20:25 challgren Migrations
# Mar 19th, 20:07 joopm and interested in how to pack db files for installing the plugin later
# Mar 19th, 20:07 joopm i made my first plugin
# Mar 19th, 20:07 joopm hello
# Mar 19th, 19:41 ricksaccous actually i didn't, rawrrrrr
# Mar 19th, 19:26 ricksaccous got it working, was simpler than that
# Mar 19th, 19:26 ricksaccous nevermind
# Mar 19th, 19:05 ricksaccous in a hasOne
# Mar 19th, 19:05 ricksaccous i would have just used sortConditions but they seem to be ignored
# Mar 19th, 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
# Mar 19th, 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
# Mar 19th, 18:34 ricksaccous no problem
# Mar 19th, 18:33 jnguyen thanks @ricksaccous
# Mar 19th, 18:33 jnguyen its just i had to make it plural on the calls too
# Mar 19th, 18:33 jnguyen ahhh okay that was it
# Mar 19th, 18:31 ricksaccous that will help you i think
# Mar 19th, 18:31 ricksaccous you can think of entities as just bags of data
# Mar 19th, 18:31 ricksaccous and you use the table class to create and patch new entities
# Mar 19th, 18:31 ricksaccous can be kind of confusing
# Mar 19th, 18:31 ricksaccous loadModel() corresponds to the table class not to the entity
# Mar 19th, 18:31 ricksaccous yeah
# Mar 19th, 18:31 ricksaccous you just need to add an s in your controller
# Mar 19th, 18:31 jnguyen ah okk
# Mar 19th, 18:30 ricksaccous etc etc
# Mar 19th, 18:30 ricksaccous $healthRecord = $this->HealthRecords->newEntity();
# Mar 19th, 18:30 ricksaccous $this->loadModel('HealthRecords);
# Mar 19th, 18:30 jnguyen its being called within another controller
# Mar 19th, 18:30 ricksaccous you are calling it wrong
# Mar 19th, 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);
# Mar 19th, 18:30 slackebot2 dd($HealthRecord); //$this->HealthRecord->save($healthRecord); }```
# Mar 19th, 18:30 jnguyen it isnt
# Mar 19th, 18:29 ricksaccous this code isn't in a plugin is it?
# Mar 19th, 18:29 jnguyen ah
# Mar 19th, 18:29 ricksaccous in the controller
# Mar 19th, 18:29 ricksaccous i mean
# Mar 19th, 18:29 jnguyen health_records
# Mar 19th, 18:29 ricksaccous so how are you calling the table?
# Mar 19th, 18:28 ricksaccous oh okay
# Mar 19th, 18:28 jnguyen and yeah I did use migrations to create the table
# Mar 19th, 18:28 jnguyen my mistake it was HealthRecordsTable.php
# Mar 19th, 18:22 ricksaccous @jnguyen also maybe use migrations in this project, after you get more of a hang of things
# Mar 19th, 18:21 ricksaccous based on conventions
# Mar 19th, 18:21 ricksaccous so HealthRecordsTable.php is what the table class should be called
# Mar 19th, 18:20 ricksaccous it's always Table.php
# Mar 19th, 18:20 ricksaccous baked that*
# Mar 19th, 18:20 ricksaccous it should not have backed that
# Mar 19th, 18:20 ricksaccous not Tables.php
# Mar 19th, 18:20 ricksaccous HealthRecordsTable.php
# Mar 19th, 18:20 ricksaccous it should have been called
# Mar 19th, 18:15 jnguyen not sure pasting the code would help because the baking seems to be all correct
# Mar 19th, 18:14 jnguyen ```SQLSTATE[42S02]: Base table or view not found: 1146 Table 'sparkplug.health_record' doesn't exist```
# Mar 19th, 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
# Mar 19th, 18:11 ricksaccous ie it's not finding my MagicRunes table
# Mar 19th, 18:11 ricksaccous and stated exactly what the problem was
# Mar 19th, 18:10 ricksaccous prob would be easier if you pasted the code in a gist or something
# Mar 19th, 18:10 jnguyen ah figured
# Mar 19th, 18:10 jnguyen sorry mean pluarl
# Mar 19th, 18:10 ricksaccous table class should be plural
# Mar 19th, 18:10 ricksaccous no
# Mar 19th, 18:09 jnguyen if im correct the table itself has to be singular correct?
# Mar 19th, 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
# Mar 19th, 14:58 emiliano thanks a lot
# Mar 19th, 14:58 emiliano my problem, is the aws elastic beanstalk jeje
# Mar 19th, 14:56 jeremyharris yeah htaccess can do that
# Mar 19th, 14:55 emiliano is there any way to tell you to generate all the urls in https, htaccess?
# Mar 19th, 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
# Mar 19th, 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...
# Mar 19th, 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
# Mar 19th, 14:35 ricksaccous use whatever js solution you think is appropriate to get n inputs
# Mar 19th, 14:35 jeremyharris ^
# Mar 19th, 14:35 ricksaccous and once you know how that works
# Mar 19th, 14:35 ricksaccous one of a hasMany
# Mar 19th, 14:35 ricksaccous yeah, i think that's what you mean, well my advice feLiruc is just focus on getting one to save
# Mar 19th, 14:34 ricksaccous oh, you mean just for duplicating inputs?
# Mar 19th, 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
# Mar 19th, 14:33 ricksaccous i'm not quite sure what that would entail
# Mar 19th, 14:32 ricksaccous meh, but yeah, maybe i should try adding it with ajax though to be honest
# Mar 19th, 14:32 feLiruc There is any example of this ajax in the controller?
# Mar 19th, 14:32 ricksaccous i just organize the input into an element where you can specify the index
# Mar 19th, 14:32 ricksaccous not necessarily, think i just needed a foreach to spit out the element, but yeah, it's somehting to consider
# Mar 19th, 14:31 jeremyharris I typically prefer the ajax solution then there’s significantly less JS and it reuses existing pages and proven functionality
# Mar 19th, 14:31 jeremyharris tough when dealing with validation errors
# Mar 19th, 14:31 jeremyharris yeah I’ve done that too
# Mar 19th, 14:31 ricksaccous and then duplicating it with the correct index when "adding"
# Mar 19th, 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
# Mar 19th, 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