Log message #4190301

# At Username Text
# Jun 20th 2019, 09:38 peppejaripappalardo @neon1024 thx for your reply, i will follow the second point, with the option
# Jun 20th 2019, 09:37 neon1024 `$this->Examples->find('published')->find('isLive')->contain(['Extra' => ['Stuff']]);`
# Jun 20th 2019, 09:36 neon1024 You can compose finders
# Jun 20th 2019, 09:36 neon1024 Or I would wrap the finds using my own custom finders in my table classes, which checked the user role using something like muffin/footprint to pass the user data into the table, or just passing the user entity into the finder as an option
# Jun 20th 2019, 09:36 peppejaripappalardo but my problem is that: i have to add custom finder, into a contain, because the entity are related
# Jun 20th 2019, 09:35 neon1024 So I would probably swap the finder based on the user role, if that’s the kinda of approach you’re looking for
# Jun 20th 2019, 09:35 neon1024 If you are using muffin/trash it has a custom finder for finding trashed items
# Jun 20th 2019, 09:35 neon1024 I don’t think that’s a good approach
# Jun 20th 2019, 09:34 peppejaripappalardo @neon1024 its a good way to do? because i need the behaviour for soft cascade delete, but in a certain point of the controller have to unload it, because i can't show the soft-deleted entity
# Jun 20th 2019, 09:30 neon1024 Something like `$this->Examples->behaviors()->unload('Thingy')` if I recall
# Jun 20th 2019, 09:30 neon1024 ..using the BehaviorCollection
# Jun 20th 2019, 09:30 neon1024 Sure, you can unload it from the Table class
# Jun 20th 2019, 09:26 peppejaripappalardo Guys, there is a way to deactivate a Behaviour in a certain point into a controller?
# Jun 20th 2019, 09:01 challgren https://book.cakephp.org/3.0/en/development/routing.html#using-named-routes
# Jun 20th 2019, 09:00 scuadra In Cake 3 which is the preferred migration to named params from Cake 2? I read that Cake 3 still has backwards compatibility to support them but maybe it's better to avoid using them in Cake 3.
# Jun 20th 2019, 08:53 challgren Yeah your at the point where I gave up and just did it all manually
# Jun 20th 2019, 08:51 peppejaripappalardo mm i think is the contain "users", that check if user is deleted and the query will not show it
# Jun 20th 2019, 08:50 challgren Good luck, it sounds like the behavior is modifying the find query
# Jun 20th 2019, 08:49 peppejaripappalardo anyway, thanks for your reply! :slightly_smiling_face:
# Jun 20th 2019, 08:49 peppejaripappalardo but if the user is soft-deleted i get the notice
# Jun 20th 2019, 08:49 peppejaripappalardo if i leave out from the trash, the user tha query work fine
# Jun 20th 2019, 08:49 challgren I started off using that plugin and then just went the manual way
# Jun 20th 2019, 08:48 challgren Hmm at this point Im not sure
# Jun 20th 2019, 08:47 peppejaripappalardo yes, this one: Notice (8): Trying to get property of non-object [APP/Template/Volunteers/index.ctp, line 85], that is because i have soft deleted the user
# Jun 20th 2019, 08:46 challgren A warning?
# Jun 20th 2019, 08:45 peppejaripappalardo without the matching it is working, but i get a warning for the user, because it is soft deleted
# Jun 20th 2019, 08:44 challgren Try removing the matching part for now and see if your contains are correct.
# Jun 20th 2019, 08:43 peppejaripappalardo @challgren Thanks for your reply, now i dont get the error, but the system do not filter the entity deleted, there is a way to do withTrashed into an entity on a contain?
# Jun 20th 2019, 08:40 challgren try find(‘withTrashed’)
# Jun 20th 2019, 08:38 slackebot1 behaviour is attached to the Table as is required. Someone who can help me?
# Jun 20th 2019, 08:38 peppejaripappalardo Hello, someone who use the Muffin/Trash plugin. I tryng to get the query with trash item, i do this: $query = $this->Volunteers->find()->withTrashed()->all() ->contain(['Users', 'Skills', 'VoluntaryOrganisations'=>['Organisations'=>['Actors']],'Badges']) ->matching('VoluntaryOrganisations.Organisations.Actors')->where($aFilters); But i get this error: Unknown method "withTrashed", but the
# Jun 20th 2019, 08:18 nuzulfikrie hi voycey, thanks, but I didn't use the FormHelper, at first, i *tested other part that used FormHelper* -still - *cake compains on the CSRF token mismatch*
# Jun 20th 2019, 08:16 voycey You need to build the form with the FormHelper and then serialize it to /xx/delete/id - including creating the hidden field with it
# Jun 20th 2019, 08:12 nuzulfikrie support hi all. i have issue with CSRF - cakephp 3.7 , I created html form with hidden input , populate the csrf token inside , form is directed to '/xx/delete/id' but , cake keep on complaining that ,the CSRF token is mismatch . i checked the token value vs the cookie value all match. been at it for hours, what am i missing?
# Jun 20th 2019, 08:12 nuzulfikrie but , cake keep on complaining that ,the CSRF token is mismatch . i checked the token value vs the cookie value all match. been at it for hours, what am i missing?
# Jun 20th 2019, 08:11 nuzulfikrie hi all. i have issue with CSRF - cakephp 3.7 , I created html form with hidden input , populate the csrf token inside , form is directed to '/xx/delete/id'
# Jun 20th 2019, 08:10 scuadra Hello. In Cake 3 which is the preferred migration to named params from Cake 2? I read that Cake 3 still has backwards compatibility to support them but maybe it's better to avoid using them in Cake 3.
# Jun 20th 2019, 07:49 admad it fails even basic email string format matching, doesn't even need MX checking
# Jun 20th 2019, 07:49 admad It's pretty obvious that `dsf564dsf2gmail.com` is an invalid email
# Jun 20th 2019, 07:47 rohit.onus ok I'll check it..
# Jun 20th 2019, 07:45 rohit.onus No, i.e. If i send 5 mail than it will work perfect.. And all other email are also valid