Logs for #cakephp

Page 7 of 36,296, showing 100 records out of 3,629,532 total, starting on record 601, ending on 700

# At Username Text
# Sep 16th, 19:39 jotpe I should go to bed...
# Sep 16th, 19:39 jotpe Just stupid. My Query is against the Confirmation and not the Email itself
# Sep 16th, 19:38 jotpe Ah wait
# Sep 16th, 19:37 ricksaccous ok
# Sep 16th, 19:37 jotpe The correct Entity
# Sep 16th, 19:37 jotpe Well, it finds it.
# Sep 16th, 19:36 ricksaccous are you sure the model is using that Entity?
# Sep 16th, 19:36 slackebot <jotpe>
# Sep 16th, 19:36 ricksaccous are you sure your naming is correct?
# Sep 16th, 19:36 ricksaccous are you sure it's namespaced correctly?
# Sep 16th, 19:36 jotpe Clearing the Cache didn't help. I remember I had the same problem and it was something with the Object.
# Sep 16th, 19:35 ricksaccous if you do a find on the model without specifying select fields do you get "status" back?
# Sep 16th, 19:35 ricksaccous did you clear your cache? did you recently add that column?
# Sep 16th, 19:35 jotpe Yeah, i was testing. but the thing is....it didn't even get into that function
# Sep 16th, 19:34 ricksaccous you should be able to do $entity->status = 'possible_enum'; without that
# Sep 16th, 19:34 ricksaccous curious why you're even using that set... since it isn't mutating anything...
# Sep 16th, 19:34 jotpe the field is an enum
# Sep 16th, 19:34 jotpe also $_accessible
# Sep 16th, 19:33 jotpe yes
# Sep 16th, 19:33 ricksaccous do you have a status field in the schema?
# Sep 16th, 19:33 jotpe I want to set the status of the mailaddress
# Sep 16th, 19:33 jotpe https://book.cakephp.org/3.0/en/orm/entities.html#Cake\ORM\Entity::set
# Sep 16th, 19:33 jotpe Yes.
# Sep 16th, 19:32 ricksaccous getters are when you want to create new virtual fields based on existing properties
# Sep 16th, 19:31 ricksaccous setters are for when you want to modify an existing property and spit that out
# Sep 16th, 19:28 jotpe I know it was something with an Object/Enity, but can't remember. Anyone knows?
# Sep 16th, 19:28 jotpe For some reason I got `Call to undefined method Users\Model\Entity\Emailaddress::status()`
# Sep 16th, 19:27 slackebot <jotpe>
# Sep 16th, 19:27 jotpe I've got a setter in my Entity for a field:
# Sep 16th, 18:36 ricksaccous @maymeow i've never tried to do that but i found this https://github.com/naneau/php-obfuscator
# Sep 16th, 18:30 maymeow i need advise. I have php application but i want protect some code from altering by users. Can be done something like this in php? (its problem because php apps is distributed as plain text not in compiled form)
# Sep 16th, 18:08 henri.mjr I understand.. worked now, thanks
# Sep 16th, 18:05 ricksaccous you can never do it the way you are attempting regardless since request data is immutable
# Sep 16th, 17:59 henri.mjr argh.. token was not accessible!
# Sep 16th, 17:56 henri.mjr uhmm
# Sep 16th, 17:56 ricksaccous yes, $this->request/$this->getRequest() are immutable
# Sep 16th, 17:55 admad @henri.mjr `$data = $this->request->getData()' unset($data['token'], $data['time_out']); $user = $this->Usuarios->patchEntity($user, $data);`
# Sep 16th, 17:43 henri.mjr $user['token'] is filled :(
# Sep 16th, 17:42 henri.mjr Hello! How it's the correct way to unset a field before patch? `$this->request->data['token'] = null;` ` $this->request->data['token_timeout'] = null;` ` $user = $this->Usuarios->patchEntity($user, $this->request->getData());`
# Sep 16th, 17:36 jotpe Thanks for your help, @javier.villanueva
# Sep 16th, 17:36 jotpe $confirmationsTable = TableRegistry::getTableLocator()->get('Users.EmailaddressConfirmations');
# Sep 16th, 17:36 jotpe it's always the same. I run into the trap of not specifiying the plugin when getting the table...
# Sep 16th, 17:35 jotpe DAMN.
# Sep 16th, 17:20 javier.villanueva yes... if you dont want save two times, you can use a database trigger
# Sep 16th, 17:20 jotpe Wait
# Sep 16th, 17:20 jotpe So i have to set before
# Sep 16th, 17:20 jotpe I guess that should break the foreign key constraint
# Sep 16th, 17:20 javier.villanueva fuck return
# Sep 16th, 17:19 javier.villanueva if ($confirmationTable->save($confirmation)) { $confirmation->emailaddress_id = $confirmation->id; }
# Sep 16th, 17:18 javier.villanueva I dont know if is possible
# Sep 16th, 17:17 javier.villanueva with a field or the same entity
# Sep 16th, 17:17 javier.villanueva do you want to set this field always (auto)
# Sep 16th, 17:17 javier.villanueva ok I understand now
# Sep 16th, 17:16 jotpe 'emailaddress_id' => $entity->id
# Sep 16th, 17:16 jotpe I set the entity_id when creating the newEntity
# Sep 16th, 17:15 javier.villanueva it creates the protection entity with emailaddress_id to "null"?
# Sep 16th, 17:15 jotpe yes
# Sep 16th, 17:15 slackebot <jotpe>
# Sep 16th, 17:15 javier.villanueva the new confirmation?
# Sep 16th, 17:14 javier.villanueva and the entity is created?
# Sep 16th, 17:14 javier.villanueva because this is the solution
# Sep 16th, 17:14 jotpe I have
# Sep 16th, 17:13 jotpe yes
# Sep 16th, 17:13 javier.villanueva check if you has access to this field in Entity
# Sep 16th, 17:07 jotpe Unfortunately setting the field in the constructor didn't worked
# Sep 16th, 17:06 slackebot <jotpe>
# Sep 16th, 17:05 jotpe When I create a new Entity with NewEntity() I want to automatically set a field in the entity. How can I do that?
# Sep 16th, 16:37 daniel.upshaw Found this too @felipe.marinho https://github.com/WyriHaximus/cakephp-async-orm
# Sep 16th, 16:36 felipe.marinho @dan I'll check this option...
# Sep 16th, 16:36 felipe.marinho After 3 minutes executing this action I'm receiving and EMPTY RESPONSE in my browser, but if I try to reload the page, the script still working for more 3 minutes... and after the execution of the script is done the page works perfect. I don't know how to solve it, I changed every timeout in my server, keep-alive-http, everything, and I still receiving this empty response after exact 3 minutes.
# Sep 16th, 16:33 daniel.upshaw @felipe.marinho Like this concept? https://reactphp.org/
# Sep 16th, 16:29 felipe.marinho Hey guys... how can I create an asyncronous action/script?
# Sep 16th, 15:27 daniel.upshaw Thanks
# Sep 16th, 15:26 ricksaccous if you run into trouble then feel free to ask questions
# Sep 16th, 15:26 daniel.upshaw Lol fair enough
# Sep 16th, 15:26 ricksaccous just copy and paste from the docs, lol
# Sep 16th, 15:25 daniel.upshaw But it's outdated it seems
# Sep 16th, 15:25 daniel.upshaw There's this Udemy course: https://www.udemy.com/course/cakephp-3-tutorial-with-user-authentication-and-admin/
# Sep 16th, 15:24 daniel.upshaw Of a recommended codebase
# Sep 16th, 15:24 daniel.upshaw Mainly a structural overview
# Sep 16th, 15:23 ricksaccous what are you trying to do that you feel lacks explanation to achieve?
# Sep 16th, 15:22 daniel.upshaw It's not super hands-on though
# Sep 16th, 15:22 daniel.upshaw Yep
# Sep 16th, 15:22 ricksaccous @daniel.upshaw have you read the docs on it?
# Sep 16th, 15:22 daniel.upshaw Having a hard time finding clear tutorials or examples of the newest Authentication system
# Sep 16th, 15:13 itmpls for contains it decides whether to left join or separate query it, right?
# Sep 16th, 15:13 itmpls yeah but the thing don't even left join it I think
# Sep 16th, 15:12 ricksaccous or at least that's the easiest way in my head
# Sep 16th, 15:12 ricksaccous @itmpls I think you'd have to select the count of the hasmany and then do a having where count >1
# Sep 16th, 15:09 itmpls if I contain a hasMany table, it will do a separate select . query unless I change the query strategy, right? i'm just trying to do a having clause where i wanna pull if there are >1 records in the hasMany
# Sep 16th, 15:09 ricksaccous @jotpe http://docs.phinx.org/en/latest/migrations.html#executing-queries
# Sep 16th, 15:09 jotpe Will do that then :slightly_smiling_face:
# Sep 16th, 15:08 ricksaccous you can indeed insert raw sql
# Sep 16th, 15:08 jotpe Or can i insert raw sql?
# Sep 16th, 15:08 ricksaccous might as well just write straight up SQL because I don't think phinx has an ORM like CakePHP that handles something like that
# Sep 16th, 15:08 ricksaccous welp
# Sep 16th, 15:07 jotpe Chicken or Egg?
# Sep 16th, 15:07 jotpe I don't have the table class for now. Need to cleanup the db first
# Sep 16th, 15:06 ricksaccous @jotpe if you want you can import the table class from cake into a migration
# Sep 16th, 15:05 jotpe or migrations