Log message #3938562

# At Username Text
# Sep 27th 2016, 15:21 prophet Okay. Should I change it to 'Users._joinData'?
# Sep 27th 2016, 15:20 ypnos prophet: ['associated' => ['Users'] this states you are patching user
# Sep 27th 2016, 15:20 ypnos prophet: because you are patching user! you just don't know it
# Sep 27th 2016, 15:20 tiagoa How do implement beforeFind in cakephp 3? Have I do a EventListener???? like this: http://book.cakephp.org/3.0/en/orm/table-objects.html#initialize?
# Sep 27th 2016, 15:20 prophet Why are the validation rules even applied? I want to patch the data that is associated to user and not user
# Sep 27th 2016, 15:20 GuillaumeP hello guys -- I've got one short question : if, for any reason, sending an email fails, what type of exception should I catch ?
# Sep 27th 2016, 15:19 ypnos well then you have to either (a) specify that the user should not be validated or (b) have a different set of validation rules for your case
# Sep 27th 2016, 15:18 prophet For the user, yes. But I am not realy editing the user but a field of the membership table. The membership table does not have validation rules.
# Sep 27th 2016, 15:18 ypnos you can remove the "$association = " part of that
# Sep 27th 2016, 15:17 ypnos well do you have validation rules that an email must be provided?
# Sep 27th 2016, 15:14 prophet This is how the call looks like $association = $this->Associations->patchEntity($association, $this->request->data, ['associated' => ['Users']]);
# Sep 27th 2016, 15:13 prophet You are right. But when I call patchEntity I get errors because 'email' etc. is missing.
# Sep 27th 2016, 15:12 ypnos why would you want to have other fields in your request data if you didn't change them?
# Sep 27th 2016, 15:11 ypnos that has nothing to do with the joinData though
# Sep 27th 2016, 15:11 ypnos well obviously the request data will only have what you submit in your form
# Sep 27th 2016, 15:10 prophet No, and this seems to be the problem. The request->data only has the attributes that I added as (hidden) form inputs. Every other attribute of the entity is missing.
# Sep 27th 2016, 15:07 ypnos so your stuff looks like this? http://book.cakephp.org/3.0/en/orm/saving-data.html#saving-data-to-the-join-table
# Sep 27th 2016, 15:04 prophet My fault. It should only be one
# Sep 27th 2016, 15:03 ypnos why are there two underscores in your request data?
# Sep 27th 2016, 15:01 prophet Edit: request->data looks like ['users' => '0' => [__joinData => ['rank', etc]], '1' => [__joinData => ['rank', etc]]]
# Sep 27th 2016, 14:57 prophet I had several approaches. I see the most fitting in saving the association with the 'associated' option. I set 'associated' to ['Users']. My request->data looks like ['users' => '0' => ['rank', etc], '1' => 'rank', etc]. As you can see it is missing all other attributes of 'user'.
# Sep 27th 2016, 14:54 ypnos did you try editing the join data?
# Sep 27th 2016, 14:49 prophet two*
# Sep 27th 2016, 14:49 prophet I have to tables (Associations, Users) connected with a 'through'-table (membership). The 'through'-table has an additional attribute 'rank'. I don't see how I can edit the rank. I can access the rank via '_joinData' field of 'users' of the association.
# Sep 27th 2016, 14:44 ypnos I would like to create a template to be replicated in my view instead of having to mangle with it in javascript
# Sep 27th 2016, 14:43 ypnos or do I need to maintain a strict numbering? (tags.0.id, tags.1.id, â?¦ etc)?
# Sep 27th 2016, 14:43 ypnos is it possible to add to the array of tags?
# Sep 27th 2016, 14:43 ypnos because I add inputs dynamically via javascript
# Sep 27th 2016, 14:43 ypnos if I don't have a numbering, though
# Sep 27th 2016, 14:42 ypnos normally the input identifiers look like "tags.0.id", "tags.0.name" etc.
# Sep 27th 2016, 14:42 ypnos so I want to submit a form with array elements (hasMany)
# Sep 27th 2016, 14:42 ypnos hello everybody
# Sep 27th 2016, 14:17 inoas admad sometimes I really dislike the way you handle things
# Sep 27th 2016, 14:15 crazycoder hmic, ^^ ?
# Sep 27th 2016, 13:54 crazycoder i think i must implement Session.timeout
# Sep 27th 2016, 13:52 crazycoder i think cake is setting something strange...
# Sep 27th 2016, 13:52 crazycoder the auth component block me first
# Sep 27th 2016, 13:51 crazycoder but it is not true! i mean... i am logged out before closing the browser
# Sep 27th 2016, 13:51 crazycoder Lifetime in seconds of cookie or, if 0, until browser is restarted. <<<<
# Sep 27th 2016, 13:51 crazycoder hmic, weird! i just checked the php.ini and i found it with 0 value
# Sep 27th 2016, 13:50 crazycoder ok