# |
Jul 15th 2019, 10:33 |
neon1024 |
Perhaps the event priority is lower than another afterSave and that is changing your data |
# |
Jul 15th 2019, 10:31 |
lubos |
The problem that dirty is saying too many properties have changed => more dirty fields than I expect and part of code where I am using `isDirty` is wrong because of that |
# |
Jul 15th 2019, 10:30 |
neon1024 |
Could it be that properties in the associated entities have not changed, so will not be saved? |
# |
Jul 15th 2019, 10:29 |
neon1024 |
Perhaps change to `Log::debug()` instead of dumping |
# |
Jul 15th 2019, 10:29 |
neon1024 |
Are you calling exit? |
# |
Jul 15th 2019, 10:29 |
lubos |
in the controller where this the model -> save which fires this particular `Model.afterSave` I debug entity and dirty fields are just fine before save action |
# |
Jul 15th 2019, 10:27 |
lubos |
Morning all in the listener I am listening to the `Model.afterSave` and trying to debug particular entity. I can see there are too many dirty fields (saving less for the action) but for got sake I can't find reason why (can't see any more model -> save in the app). Any hint how to debug dirty fields? |
# |
Jul 15th 2019, 10:13 |
neothermic |
you been sword fighting again? :P |
# |
Jul 15th 2019, 08:49 |
challgren |
The scar is horse shoe shaped the whole knuckle pretty much |
# |
Jul 15th 2019, 08:48 |
neon1024 |
About the feeling, and perhaps the scar too |
# |
Jul 15th 2019, 08:48 |
neon1024 |
That’s good news :slightly_smiling_face: |
# |
Jul 15th 2019, 08:48 |
challgren |
Ahh good, got feeling back a couple weeks ago, nice big ol scar on it |
# |
Jul 15th 2019, 08:48 |
neon1024 |
Hey @challgren! How’s the hand these days? |
# |
Jul 15th 2019, 08:47 |
matt |
Great - thanks for the advice |
# |
Jul 15th 2019, 08:47 |
challgren |
Thats what I was gonna say have different validation sets |
# |
Jul 15th 2019, 08:46 |
neon1024 |
Or I would create a validation sub-set and use that conditionally |
# |
Jul 15th 2019, 08:46 |
neon1024 |
I’d probably write a custom rule, and use the context to work out if I wanted the rule to run or not |
# |
Jul 15th 2019, 08:41 |
matt |
Morning, is it possible to skip/disable an individual rule when saving an entity? (rather than disabling all rules with checkrules=false). thanks |
# |
Jul 15th 2019, 08:34 |
conehead |
But with meta/pagination it definately makes sense to use a top level dimension |
# |
Jul 15th 2019, 08:26 |
neon1024 |
I should follow that up actually and get some discussions underway on the points people raised |
# |
Jul 15th 2019, 08:26 |
neon1024 |
Well I wrote the RFC for our own internal standard, and I did reference some parts of that spec, but we felt it was a bit overkill |
# |
Jul 15th 2019, 08:25 |
conehead |
@neon1024 Exactly what I expected! Everyone is saying something else ;) But in the end... https://jsonapi.org/ suggests using envelopes. Although this might not be a reliable source |
# |
Jul 15th 2019, 08:18 |
conehead |
Is it? I'll do a quick research |
# |
Jul 15th 2019, 08:17 |
neon1024 |
Most of the ones I’ve read about implement a generic keyword like ‘data’, ‘results’ or similar |
# |
Jul 15th 2019, 08:16 |
neon1024 |
Usually to differentiate data from meta, pagination and other data which might be in the response |
# |
Jul 15th 2019, 08:16 |
neon1024 |
Most standards implement a top level dimension |
# |
Jul 15th 2019, 08:16 |
neon1024 |
I think it’s the opposite actually |
# |
Jul 15th 2019, 08:15 |
conehead |
Okay thank you. Gonna try that. Was hoping this was an option I could pass to `_serialize`. I think this is quite common for REST apis |
# |
Jul 15th 2019, 08:13 |
neon1024 |
You could drop serialize and use a json template to customise the output if you wanted |
# |
Jul 15th 2019, 08:13 |
conehead |
Anyone using lots of json response? Can I get rid of the top level object with a single line? ` '_serialize' => ['users'],` always creates the `users` property. But as I only got this one property, I want to get rid of it |
# |
Jul 15th 2019, 08:11 |
conehead |
;) |
# |
Jul 15th 2019, 08:07 |
neon1024 |
Or Fridays Dave didn’t at any rate :slightly_smiling_face: |
# |
Jul 15th 2019, 08:07 |
neon1024 |
Looks like I have no idea how to use `in_array()` :flushed: |
# |
Jul 15th 2019, 07:47 |
neon1024 |
Oh yes of course ndm mentioned execution order, I should check that |
# |
Jul 15th 2019, 07:47 |
neon1024 |
I tried using `$this->Auth->setConfig('unauthorizedRedirect', ['prefix' => 'admin', 'controller' => 'Dashboards', 'action' => 'home']);` and it doesn’t seem to work |
# |
Jul 15th 2019, 07:47 |
neon1024 |
So, rolling back to Monday. How can I set the Auth unauthorizedRedirect dynamically? |
# |
Jul 15th 2019, 02:26 |
markstory |
@davorminchorov Also check php’s memory_limit ini value as it can be different than the container memory. |
# |
Jul 15th 2019, 01:58 |
nuzulfikrie |
hi all, any solution that checks for number of login of user ? limit only one browser session per tab - if we have multiple of sessions, will redirect the user to the tab that user chooses. similar like whatsapp web |
# |
Jul 14th 2019, 19:32 |
ndm |
@davorminchorov Install xdebug or something similar that will provide you with a proper stacktrace for fatal errors. |
# |
Jul 14th 2019, 19:01 |
davorminchorov |
Anyone here ever got the error: `Allowed memory size of 786432000 bytes exhausted (tried to allocate 16384 bytes)`? How can I debug it to figure out why it is happening? I have allocated 4 GB on my docker instance but it seems that it is not enough. I am assuming that it has to do with bad application code. |
# |
Jul 14th 2019, 16:14 |
roberto.conterosito |
You're not wrong, probably I've to rethink this specific scenario. |